test(config): align current odds and settlement contracts

This commit is contained in:
wchino
2026-07-21 23:41:18 +08:00
parent 457d2cc9e5
commit 150c3e7ebd
11 changed files with 93 additions and 163 deletions

View File

@@ -1,6 +1,7 @@
<?php
use App\Lottery\ErrorCode;
use App\Models\LotterySetting;
use Database\Seeders\CurrencySeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
@@ -18,14 +19,14 @@ test('public settings requires allowed group', function (): void {
$this->getJson('/api/v1/settings?group=wallet')
->assertStatus(400)
->assertJsonPath('code', ErrorCode::ClientHttpError->value);
$this->getJson('/api/v1/settings?group=currency')
->assertStatus(400)
->assertJsonPath('code', ErrorCode::ClientHttpError->value);
->assertOk()
->assertJsonPath('code', ErrorCode::Success->value);
});
test('public settings returns frontend group only', function (): void {
\App\Models\LotterySetting::query()->updateOrCreate(
test('public settings returns an allowed public group', function (): void {
LotterySetting::query()->updateOrCreate(
['setting_key' => 'frontend.play_rules_html_zh'],
[
'group_name' => 'frontend',