complete story 9.7 with qa tests
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Page;
|
||||
use App\Models\User;
|
||||
|
||||
beforeEach(function () {
|
||||
// Seed the legal pages required for terms/privacy tests
|
||||
Page::factory()->terms()->create();
|
||||
Page::factory()->privacy()->create();
|
||||
});
|
||||
|
||||
describe('Public Pages', function () {
|
||||
test('home page is accessible', function () {
|
||||
$this->get(route('home'))
|
||||
@@ -20,12 +27,22 @@ describe('Public Pages', function () {
|
||||
});
|
||||
|
||||
test('terms page is accessible', function () {
|
||||
// Legacy route redirects to /page/terms
|
||||
$this->get(route('terms'))
|
||||
->assertRedirect('/page/terms');
|
||||
|
||||
// Actual page responds correctly
|
||||
$this->get('/page/terms')
|
||||
->assertOk();
|
||||
});
|
||||
|
||||
test('privacy page is accessible', function () {
|
||||
// Legacy route redirects to /page/privacy
|
||||
$this->get(route('privacy'))
|
||||
->assertRedirect('/page/privacy');
|
||||
|
||||
// Actual page responds correctly
|
||||
$this->get('/page/privacy')
|
||||
->assertOk();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user