Files
SkinbaseNova/tests/Feature/Collections/CollectionDispatchGateTest.php
T
klevze 8a80aae21e Ship production optimization M1-M12.5A: queues, metrics, HTTP observability, and vector search reliability.
Keep similar-ai from tripping the global circuit on a lone URL 502, clamp Qdrant search to 100, and add Server-Timing plus slow-request logging. Studio shared props, Academy S3 exists caching, heat chunking, and Redis/scheduler hygiene stay in this rollout.
2026-08-25 07:58:47 +02:00

19 lines
565 B
PHP

<?php
use App\Models\Collection;
use App\Services\CollectionBackgroundJobService;
use Illuminate\Support\Facades\Queue;
it('does not dispatch collection jobs when the producer gate is off', function () {
config(['collections.v5.queue.dispatch_enabled' => false]);
Queue::fake();
$collection = Collection::factory()->create();
$result = app(CollectionBackgroundJobService::class)->dispatchHealthRefresh($collection);
expect($result['status'])->toBe('disabled')
->and($result['count'])->toBe(0);
Queue::assertNothingPushed();
});