Write tests - Write tests for what was done to this point that will be kept #11
|
|
@ -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