Skip to content

Commit 2abf28a

Browse files
Update assertStatus calls to use helper methods instead (#200)
1 parent 0021e72 commit 2abf28a

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

tests/Feature/Auth/AuthenticationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function test_login_screen_can_be_rendered(): void
1515
{
1616
$response = $this->get(route('login'));
1717

18-
$response->assertStatus(200);
18+
$response->assertOk();
1919
}
2020

2121
public function test_users_can_authenticate_using_the_login_screen(): void

tests/Feature/Auth/EmailVerificationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function test_email_verification_screen_can_be_rendered(): void
1919

2020
$response = $this->actingAs($user)->get(route('verification.notice'));
2121

22-
$response->assertStatus(200);
22+
$response->assertOk();
2323
}
2424

2525
public function test_email_can_be_verified(): void

tests/Feature/Auth/PasswordConfirmationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ public function test_confirm_password_screen_can_be_rendered(): void
1616

1717
$response = $this->actingAs($user)->get(route('password.confirm'));
1818

19-
$response->assertStatus(200);
19+
$response->assertOk();
2020
}
2121
}

tests/Feature/Auth/PasswordResetTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function test_reset_password_link_screen_can_be_rendered(): void
1616
{
1717
$response = $this->get(route('password.request'));
1818

19-
$response->assertStatus(200);
19+
$response->assertOk();
2020
}
2121

2222
public function test_reset_password_link_can_be_requested(): void
@@ -40,7 +40,7 @@ public function test_reset_password_screen_can_be_rendered(): void
4040

4141
Notification::assertSentTo($user, ResetPassword::class, function ($notification) {
4242
$response = $this->get(route('password.reset', $notification->token));
43-
$response->assertStatus(200);
43+
$response->assertOk();
4444

4545
return true;
4646
});

tests/Feature/Auth/RegistrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function test_registration_screen_can_be_rendered(): void
1313
{
1414
$response = $this->get(route('register'));
1515

16-
$response->assertStatus(200);
16+
$response->assertOk();
1717
}
1818

1919
public function test_new_users_can_register(): void

tests/Feature/DashboardTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ public function test_authenticated_users_can_visit_the_dashboard(): void
1919
{
2020
$this->actingAs($user = User::factory()->create());
2121

22-
$this->get('/dashboard')->assertStatus(200);
22+
$this->get('/dashboard')->assertOk();
2323
}
2424
}

tests/Feature/ExampleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public function test_returns_a_successful_response(): void
1313
{
1414
$response = $this->get('/');
1515

16-
$response->assertStatus(200);
16+
$response->assertOk();
1717
}
1818
}

0 commit comments

Comments
 (0)