feat: add routes, lang, tests, stubs, docs, and docker configurations

This commit is contained in:
2026-05-21 16:05:16 +07:00
parent fad70d096b
commit 28a06315b8
3385 changed files with 177070 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Cache;
test('mobile sync returns expected envelope keys', function () {
$response = $this->getJson('/api/v1/mobile/sync');
$response->assertOk()
->assertJsonStructure(['status', 'version', 'last_updated', 'data']);
expect($response->json('status'))->toBe('success');
expect($response->json('data'))->toBeArray()->not->toBeEmpty();
});
test('mobile sync responds with ETag header', function () {
$response = $this->getJson('/api/v1/mobile/sync');
$response->assertOk();
expect($response->headers->get('ETag'))->not->toBeNull();
});
test('mobile sync returns 304 when If-None-Match matches', function () {
$etag = $this->getJson('/api/v1/mobile/sync')->headers->get('ETag');
$this->withHeaders(['If-None-Match' => $etag])
->getJson('/api/v1/mobile/sync')
->assertStatus(304);
});
test('mobile sync is cached', function () {
$this->getJson('/api/v1/mobile/sync');
expect(Cache::has('mobile_config_all'))->toBeTrue();
});