ldc-cocotte/tests/Feature/App/Http/Controllers/Fo/Ajax/PickupControllerTest.php

28 lines
711 B
PHP
Raw Permalink Normal View History

2026-06-14 21:32:07 +02:00
<?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 () {
/** @var \Tests\TestCase $this */
2026-06-14 21:32:07 +02:00
// 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);
});
});