23 lines
626 B
PHP
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);
|
|
});
|