Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
JokeUrSelf committed Dec 23, 2024
1 parent a8d32a4 commit 89be2a8
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions tests/Feature/QuizTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,7 @@ public function testAdminCanViewQuizzes(): void
->has("quizzes.data.1.questions", 5),
);
}

public function testLocalQuizHasNoQuestionsVisible(): void
{
$quiz = Quiz::factory()->local()->create();
Question::factory()->count(5)->create(["quiz_id" => $quiz->id]);

$this->actingAs($this->admin)
->get("/admin/quizzes")
->assertInertia(
fn(Assert $page) => $page
->component("Admin/Quizzes")
->has("quizzes.data", 1)
->has("quizzes.data.0.questions", 0),
);

$quiz->is_local = false;
$quiz->save();

$this->actingAs($this->admin)
->get("/admin/quizzes")
->assertInertia(
fn(Assert $page) => $page
->component("Admin/Quizzes")
->has("quizzes.data", 1)
->has("quizzes.data.0.questions", 5),
);
}


public function testAdminCanCreateQuiz(): void
{
$this->actingAs($this->admin)
Expand Down

0 comments on commit 89be2a8

Please sign in to comment.