We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d609ac4 commit 03af674Copy full SHA for 03af674
tests/Feature/DashboardTest.php
@@ -12,16 +12,13 @@ class DashboardTest extends TestCase
12
13
public function test_guests_are_redirected_to_the_login_page()
14
{
15
- $response = $this->get('/dashboard');
16
- $response->assertRedirect('/login');
+ $this->get('/dashboard')->assertRedirect('/login');
17
}
18
19
public function test_authenticated_users_can_visit_the_dashboard()
20
21
- $user = User::factory()->create();
22
- $this->actingAs($user);
+ $this->actingAs($user = User::factory()->create());
23
24
25
- $response->assertStatus(200);
+ $this->get('/dashboard')->assertOk();
26
27
tests/Feature/ExampleTest.php
0 commit comments