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,19 +1,26 @@
<?php
use App\Models\AdminUser;
use App\Models\Draw;
use App\Models\Player;
use App\Models\AdminUser;
use App\Lottery\DrawStatus;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Foundation\Testing\RefreshDatabase;
use App\Services\AgentSettlement\SettlementPeriodOpenHintsService;
uses(RefreshDatabase::class);
beforeEach(function (): void {
Carbon::setTestNow('2026-07-09 12:00:00');
$this->artisan('lottery:admin-auth-sync')->assertExitCode(0);
});
afterEach(function (): void {
Carbon::setTestNow();
});
test('settlement period open hints api resource is configured after migrations', function (): void {
expect(
DB::table('admin_api_resources')
@@ -295,7 +302,7 @@ test('settlement period open hints uses site timezone for orphan activity dates'
'updated_at' => '2026-07-09 18:00:00',
]);
$hints = app(\App\Services\AgentSettlement\SettlementPeriodOpenHintsService::class)->hints($siteId);
$hints = app(SettlementPeriodOpenHintsService::class)->hints($siteId);
expect($hints['settlement_timezone'])->toBe('Asia/Kathmandu')
->and($hints['occupied_period_dates'])->toContain('2026-07-09')