Skip to content

Commit

Permalink
Improve default auth tests inside the stubs (#358)
Browse files Browse the repository at this point in the history
* Improve default auth tests inside the stubs

* Improve default api auth tests inside the stubs
  • Loading branch information
Pilskalns authored Feb 19, 2024
1 parent 095c4c5 commit c8bd0a8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion stubs/api/pest-tests/Feature/Auth/PasswordResetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
'password_confirmation' => 'password',
]);

$response->assertSessionHasNoErrors();
$response
->assertSessionHasNoErrors()
->assertStatus(200);

return true;
});
Expand Down
4 changes: 3 additions & 1 deletion stubs/api/tests/Feature/Auth/PasswordResetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ public function test_password_can_be_reset_with_valid_token(): void
'password_confirmation' => 'password',
]);

$response->assertSessionHasNoErrors();
$response
->assertSessionHasNoErrors()
->assertStatus(200);

return true;
});
Expand Down
4 changes: 3 additions & 1 deletion stubs/default/pest-tests/Feature/Auth/PasswordResetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
'password_confirmation' => 'password',
]);

$response->assertSessionHasNoErrors();
$response
->assertSessionHasNoErrors()
->assertRedirect(route('login'));

return true;
});
Expand Down
4 changes: 3 additions & 1 deletion stubs/default/tests/Feature/Auth/PasswordResetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ public function test_password_can_be_reset_with_valid_token(): void
'password_confirmation' => 'password',
]);

$response->assertSessionHasNoErrors();
$response
->assertSessionHasNoErrors()
->assertRedirect(route('login'));

return true;
});
Expand Down

0 comments on commit c8bd0a8

Please sign in to comment.