Skip to content

Commit ddfde8b

Browse files
committed
wip
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent cab6a56 commit ddfde8b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Browser/DashboardTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use App\Models\User;
4+
35
test('guests are redirected to the login page', function () {
46
visit('/dashboard')
57
->assertPathEndsWith('/login')
@@ -8,3 +10,12 @@
810
->assertSee('Log in to your account')
911
->assertSee('Enter your email and password below to log in');
1012
});
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

Comments
 (0)