2026-09-17 02:28:11 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use App\Models\User;
|
|
|
|
|
|
2026-09-17 02:41:12 +00:00
|
|
|
test('guests are redirected from my-runs to the login page', function () {
|
|
|
|
|
$response = $this->get(route('my-runs'));
|
|
|
|
|
|
|
|
|
|
$response->assertRedirect(route('login'));
|
|
|
|
|
});
|
2026-09-17 02:28:11 +00:00
|
|
|
|
2026-09-17 02:41:12 +00:00
|
|
|
test('authenticated users can visit the home page', function () {
|
|
|
|
|
$this->actingAs(User::factory()->create());
|
2026-09-17 02:28:11 +00:00
|
|
|
|
2026-09-17 02:41:12 +00:00
|
|
|
$response = $this->get(route('home'));
|
2026-09-17 02:28:11 +00:00
|
|
|
|
2026-09-17 02:41:12 +00:00
|
|
|
$response->assertStatus(200);
|
|
|
|
|
});
|