ramadanproject/tests/Feature/PublicGridMetaTest.php
Ahmed Darrazi 45a147253c
Some checks failed
tests / ci (push) Failing after 6m13s
linter / quality (pull_request) Failing after 58s
linter / quality (push) Failing after 1m19s
tests / ci (pull_request) Failing after 5m28s
feat(public-grid): add QA, quickstart, decision docs; scheduler docs; ignore files; tasks updates; run pint
2026-01-03 04:56:12 +01:00

23 lines
626 B
PHP

<?php
use App\Models\MasterImage;
use Illuminate\Support\Facades\Storage;
it('returns grid meta with master image url and cell_size', function () {
Storage::fake('public');
// Ensure a master image exists in storage
Storage::disk('public')->put('master/master.png', 'contents');
MasterImage::create(['path' => 'master/master.png', 'version' => 3]);
$response = $this->getJson('/api/grid/meta');
$response->assertOk();
$json = $response->json();
expect($json['master_image_url'])->toBeString();
expect($json['cell_size'])->toBeInt();
expect($json['master_version'])->toBe(3);
});