Files
ladill-pos/tests/Feature/AssetLinksTest.php
T
isaaccladandCursor e5d2b84388
Deploy Ladill Mini / deploy (push) Successful in 23s
Add Ladill POS v1 — register, Pay checkout, and commerce links.
Staff-facing counter register at pos.ladill.com with catalog cart, cash and
MoMo/card checkout via Ladill Pay, CRM timeline/import, invoice prefill, and
Merchant catalog import.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-23 22:52:24 +00:00

42 lines
1.4 KiB
PHP

<?php
namespace Tests\Feature;
use Tests\TestCase;
class AssetLinksTest extends TestCase
{
public function test_assetlinks_returns_404_when_fingerprints_not_configured(): void
{
config(['android_app_links.sha256_cert_fingerprints' => []]);
$this->get('/.well-known/assetlinks.json')->assertNotFound();
}
public function test_assetlinks_returns_json_when_configured(): void
{
config([
'android_app_links.package_name' => 'com.ladill.mini',
'android_app_links.sha256_cert_fingerprints' => [
'AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99',
],
]);
$this->get('/.well-known/assetlinks.json')
->assertOk()
->assertHeader('Content-Type', 'application/json')
->assertJson([
[
'relation' => ['delegate_permission/common.handle_all_urls'],
'target' => [
'namespace' => 'android_app',
'package_name' => 'com.ladill.mini',
'sha256_cert_fingerprints' => [
'AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99',
],
],
],
]);
}
}