Add check for not logged in user to PageResponse
This commit is contained in:
parent
3ba70bea89
commit
96e5896887
|
|
@ -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'))
|
||||
|
|
|
|||
Loading…
Reference in New Issue