feat(admin): 完善后台角色管理与权限同步,新增当前管理员信息接口
This commit is contained in:
@@ -28,29 +28,23 @@ test('admin settlement batches index is authenticated', function (): void {
|
||||
});
|
||||
|
||||
test('admin jackpot pools index returns rows', function (): void {
|
||||
JackpotPool::query()->create([
|
||||
'currency_code' => 'NPR',
|
||||
'current_amount' => 100,
|
||||
'contribution_rate' => '0.01',
|
||||
'trigger_threshold' => 1000,
|
||||
'payout_rate' => '0.5',
|
||||
'force_trigger_draw_gap' => 10,
|
||||
'min_bet_amount' => 0,
|
||||
'status' => 1,
|
||||
'last_trigger_draw_id' => null,
|
||||
]);
|
||||
|
||||
$token = mintSettlementAdminToken();
|
||||
$this->withHeader('Authorization', 'Bearer '.$token)
|
||||
->getJson('/api/v1/admin/jackpot/pools')
|
||||
->assertOk()
|
||||
->assertJsonPath('data.items.0.currency_code', 'NPR')
|
||||
->assertJsonPath('data.items.0.contribution_rate', '0.0200')
|
||||
->assertJsonPath('data.items.0.trigger_threshold', 100000000)
|
||||
->assertJsonPath('data.items.0.payout_rate', '0.5000')
|
||||
->assertJsonPath('data.items.0.force_trigger_draw_gap', 100)
|
||||
->assertJsonPath('data.items.0.min_bet_amount', 100)
|
||||
->assertJsonPath('data.items.0.status', 0)
|
||||
->assertJsonPath('data.items.0.combo_trigger_play_codes', []);
|
||||
});
|
||||
|
||||
test('admin can update jackpot combo trigger and manually burst pool', function (): void {
|
||||
$pool = JackpotPool::query()->create([
|
||||
'currency_code' => 'NPR',
|
||||
$pool = JackpotPool::query()->where('currency_code', 'NPR')->firstOrFail();
|
||||
$pool->forceFill([
|
||||
'current_amount' => 1000,
|
||||
'contribution_rate' => '0.01',
|
||||
'trigger_threshold' => 1000,
|
||||
@@ -59,7 +53,7 @@ test('admin can update jackpot combo trigger and manually burst pool', function
|
||||
'min_bet_amount' => 0,
|
||||
'status' => 1,
|
||||
'last_trigger_draw_id' => null,
|
||||
]);
|
||||
])->save();
|
||||
$draw = Draw::query()->create([
|
||||
'draw_no' => '20260518-001',
|
||||
'business_date' => '2026-05-18',
|
||||
|
||||
Reference in New Issue
Block a user