Skip to content

Commit b612ae5

Browse files
committed
Refactor Test
1 parent ab5140c commit b612ae5

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

tests/Feature/Auth/PasswordResetTest.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,10 @@ public function test_reset_password_screen_can_be_rendered()
3838

3939
$this->post(route('password.email'), ['email' => $user->email]);
4040

41-
Notification::assertSentTo($user, ResetPassword::class, function ($notification) use ($user) {
42-
$response = $this->get(route('password.reset', $notification->token).'?email='.$user->email);
43-
44-
$response->assertStatus(200)
45-
->assertInertia(fn ($page) => $page
46-
->component('auth/reset-password')
47-
->has('email')
48-
->has('token')
49-
->where('email', $user->email)
50-
->where('token', $notification->token)
51-
);
41+
Notification::assertSentTo($user, ResetPassword::class, function ($notification) {
42+
$response = $this->get(route('password.reset', $notification->token));
43+
44+
$response->assertStatus(200);
5245

5346
return true;
5447
});

0 commit comments

Comments
 (0)