Add check for not logged in user to PageResponse

This commit is contained in:
Matt Young 2024-07-01 14:17:24 -05:00
parent 3ba70bea89
commit 96e5896887
1 changed files with 4 additions and 0 deletions

View File

@ -61,6 +61,10 @@ it('shows dashboard only if logged in', function () {
it('shows students index only for a user with a school', function () {
// Act & Assert
get(route('students.index'))
->assertStatus(302)
->assertRedirect(route('home'));
$user = User::factory()->create();
$this->actingAs($user);
get(route('students.index'))