27 lines
669 B
PHP
27 lines
669 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
use App\Models\Page;
|
||
|
|
use Database\Seeders\ContentSeeder;
|
||
|
|
use Illuminate\Support\Facades\Cache;
|
||
|
|
use Illuminate\Support\Facades\View;
|
||
|
|
|
||
|
|
describe('PickupController', function () {
|
||
|
|
it('can access get /ajax/shops/1/pickup-timeslots', function () {
|
||
|
|
// GIVEN
|
||
|
|
$this->seed(ContentSeeder::class);
|
||
|
|
View::share('PageList', Page::getCached()
|
||
|
|
->mapWithKeys(fn ($page) => [
|
||
|
|
$page->slug->value() => $page,
|
||
|
|
]));
|
||
|
|
Cache::flush();
|
||
|
|
|
||
|
|
// WHEN
|
||
|
|
$response = $this->get('/ajax/shops/1/pickup-timeslots');
|
||
|
|
|
||
|
|
// THEN
|
||
|
|
$response->assertStatus(404);
|
||
|
|
});
|
||
|
|
});
|