Test for prelim auditions showing on judging dashboard.

This commit is contained in:
Matt Young 2025-09-22 21:21:32 -05:00
parent 23442ad740
commit 49b203cc25
1 changed files with 16 additions and 0 deletions

View File

@ -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 () {