[FIX] [BUG] Impossible d'ajouter un morceau #4
This commit is contained in:
@@ -175,6 +175,14 @@ class APITest {
|
||||
public function testCreateScoreWithPieces() {
|
||||
$this->section("Create Score with Pieces - Functional");
|
||||
|
||||
// Test 0: Try to create score with existing ID should fail
|
||||
$result = $this->request('POST', 'admin/scores', [
|
||||
'name' => 'Test Duplicate',
|
||||
'compositor' => 'Test',
|
||||
'id' => '001'
|
||||
]);
|
||||
$this->test('Create with existing ID returns error', $result['code'] === 400 && isset($result['body']['error']));
|
||||
|
||||
// Test 1: Create score with 2 pieces
|
||||
$testName = 'Test Score ' . date('YmdHis');
|
||||
$result = $this->request('POST', 'admin/scores', [
|
||||
|
||||
Reference in New Issue
Block a user