diff --git a/tests/Feature/app/Http/Controllers/Judging/JudgingControllerTest.php b/tests/Feature/app/Http/Controllers/Judging/JudgingControllerTest.php index 38a855d..041bde5 100644 --- a/tests/Feature/app/Http/Controllers/Judging/JudgingControllerTest.php +++ b/tests/Feature/app/Http/Controllers/Judging/JudgingControllerTest.php @@ -4,6 +4,7 @@ use App\Models\Audition; use App\Models\BonusScoreDefinition; use App\Models\Entry; use App\Models\JudgeAdvancementVote; +use App\Models\PrelimDefinition; use App\Models\Room; use App\Models\ScoreSheet; use App\Models\ScoringGuide; @@ -31,6 +32,21 @@ describe('JudgingController::index', function () { $response->assertSee($room->name); $response->assertSee($bonusScoreDefinition->name); }); + it('shows prelim auditions the user is assigned to juge', function () { + $judge = User::factory()->create(); + $room = Room::factory()->create(); + $room->judges()->attach($judge); + $audition = Audition::factory()->create(); + $prelimAudition = PrelimDefinition::create([ + 'audition_id' => $audition->id, + 'room_id' => $room->id, + 'passing_score' => 75, + ]); + $response = $this->actingAs($judge)->get(route('judging.index')); + $response->assertOk(); + $response->assertSee($room->name); + $response->assertSee($audition->name.' Prelims'); + }); }); describe('JudgingController::auditionEntryList', function () {