новый дизайн
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Inertia\Testing\AssertableInertia as Assert;
|
||||
use Tests\TestCase;
|
||||
|
||||
class InertiaPublicPagesFeatureTest extends TestCase
|
||||
{
|
||||
public function test_login_page_uses_inertia(): void
|
||||
{
|
||||
$this->get(route('login'))
|
||||
->assertOk()
|
||||
->assertInertia(fn (Assert $page) => $page
|
||||
->component('Auth/Login', false)
|
||||
->where('auth.authenticated', false)
|
||||
->where('urls.login_store', route('login.store'))
|
||||
->etc()
|
||||
);
|
||||
}
|
||||
|
||||
public function test_hidden_legal_pages_return_not_found(): void
|
||||
{
|
||||
$this->get(route('legal.offer'))->assertNotFound();
|
||||
$this->get(route('legal.privacy'))->assertNotFound();
|
||||
}
|
||||
|
||||
public function test_legal_pages_can_be_published_by_configuration(): void
|
||||
{
|
||||
config(['moonwell.legal.published' => true]);
|
||||
|
||||
$this->get(route('legal.offer'))
|
||||
->assertOk()
|
||||
->assertInertia(fn (Assert $page) => $page
|
||||
->component('Legal/Offer', false)
|
||||
->where('legal.operator_name', config('moonwell.legal.operator_name'))
|
||||
->where('urls.privacy', route('legal.privacy'))
|
||||
->etc()
|
||||
);
|
||||
|
||||
$this->get(route('legal.privacy'))
|
||||
->assertOk()
|
||||
->assertInertia(fn (Assert $page) => $page
|
||||
->component('Legal/Privacy', false)
|
||||
->where('legal.contact_email', config('moonwell.legal.contact_email'))
|
||||
->where('urls.offer', route('legal.offer'))
|
||||
->etc()
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user