Test for prelim auditions showing on judging dashboard.
This commit is contained in:
parent
23442ad740
commit
49b203cc25
|
|
@ -4,6 +4,7 @@ use App\Models\Audition;
|
||||||
use App\Models\BonusScoreDefinition;
|
use App\Models\BonusScoreDefinition;
|
||||||
use App\Models\Entry;
|
use App\Models\Entry;
|
||||||
use App\Models\JudgeAdvancementVote;
|
use App\Models\JudgeAdvancementVote;
|
||||||
|
use App\Models\PrelimDefinition;
|
||||||
use App\Models\Room;
|
use App\Models\Room;
|
||||||
use App\Models\ScoreSheet;
|
use App\Models\ScoreSheet;
|
||||||
use App\Models\ScoringGuide;
|
use App\Models\ScoringGuide;
|
||||||
|
|
@ -31,6 +32,21 @@ describe('JudgingController::index', function () {
|
||||||
$response->assertSee($room->name);
|
$response->assertSee($room->name);
|
||||||
$response->assertSee($bonusScoreDefinition->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 () {
|
describe('JudgingController::auditionEntryList', function () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue