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 cab6a56 commit ddfde8bCopy full SHA for ddfde8b
tests/Browser/DashboardTest.php
@@ -1,5 +1,7 @@
1
<?php
2
3
+use App\Models\User;
4
+
5
test('guests are redirected to the login page', function () {
6
visit('/dashboard')
7
->assertPathEndsWith('/login')
@@ -8,3 +10,12 @@
8
10
->assertSee('Log in to your account')
9
11
->assertSee('Enter your email and password below to log in');
12
});
13
14
+test('authenticated users can visit the dashboard', function () {
15
+ $this->actingAs(User::factory()->create());
16
17
+ visit('/dashboard')
18
+ ->assertPathEndsWith('/dashboard')
19
+ ->assertNoConsoleLogs()
20
+ ->assertNoJavaScriptErrors();
21
+});
0 commit comments