Skip to content

Commit 03af674

Browse files
committed
update tests
1 parent d609ac4 commit 03af674

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

tests/Feature/DashboardTest.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@ class DashboardTest extends TestCase
1212

1313
public function test_guests_are_redirected_to_the_login_page()
1414
{
15-
$response = $this->get('/dashboard');
16-
$response->assertRedirect('/login');
15+
$this->get('/dashboard')->assertRedirect('/login');
1716
}
1817

1918
public function test_authenticated_users_can_visit_the_dashboard()
2019
{
21-
$user = User::factory()->create();
22-
$this->actingAs($user);
20+
$this->actingAs($user = User::factory()->create());
2321

24-
$response = $this->get('/dashboard');
25-
$response->assertStatus(200);
22+
$this->get('/dashboard')->assertOk();
2623
}
2724
}

tests/Feature/ExampleTest.php

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)