From 149389a3821f12dee8a2a35c6a3097bd6da6d8ad Mon Sep 17 00:00:00 2001 From: Thorsten Bus Date: Mon, 2 Mar 2026 23:02:58 +0100 Subject: [PATCH] fix(test): add deterministic order values in SongPdfTest Specify explicit order values for SongGroup factories to avoid unique constraint violations on the composite (song_id, order) key when faker generates duplicate random values. --- tests/Feature/SongPdfTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Feature/SongPdfTest.php b/tests/Feature/SongPdfTest.php index 250638a..798d05f 100644 --- a/tests/Feature/SongPdfTest.php +++ b/tests/Feature/SongPdfTest.php @@ -264,12 +264,14 @@ 'song_id' => $song->id, 'name' => 'Strophe 1', 'color' => '#3b82f6', + 'order' => 1, ]); $chorus = SongGroup::factory()->create([ 'song_id' => $song->id, 'name' => 'Refrain', 'color' => '#ef4444', + 'order' => 2, ]); SongSlide::factory()->create([ @@ -332,6 +334,7 @@ $group = SongGroup::factory()->create([ 'song_id' => $song->id, 'name' => 'Verse', + 'order' => 1, ]); SongSlide::factory()->create([