Download tests/Feature/DashboardTest.php from lifedebugger/CAPS04-FE-REFACTOR-2: direct link, hf CLI and curl.
- Browser
- Download file 403 Bytes
-
https://huggingface.co/spaces/lifedebugger/CAPS04-FE-REFACTOR-2/resolve/main/tests/Feature/DashboardTest.php
- Command line
-
hf download hf://spaces/lifedebugger/CAPS04-FE-REFACTOR-2/tests/Feature/DashboardTest.php
-
curl -L -o DashboardTest.php https://huggingface.co/spaces/lifedebugger/CAPS04-FE-REFACTOR-2/resolve/main/tests/Feature/DashboardTest.php
403 Bytes
| use App\Models\User; | |
| test('guests are redirected to the login page', function () { | |
| $response = $this->get(route('dashboard')); | |
| $response->assertRedirect(route('login')); | |
| }); | |
| test('authenticated users can visit the dashboard', function () { | |
| $user = User::factory()->create(); | |
| $this->actingAs($user); | |
| $response = $this->get(route('dashboard')); | |
| $response->assertOk(); | |
| }); |