优化ai小班长

This commit is contained in:
2026-04-12 22:42:32 +08:00
parent d739fc7028
commit 353aaaf6ce
6 changed files with 36 additions and 36 deletions
+8 -8
View File
@@ -3,7 +3,7 @@
/**
* 文件功能:AI小班长百家乐下注任务测试
*
* 覆盖 AI 在“你玩游戏我买单”活动进行中时的全额下注策略,
* 覆盖 AI 在“你玩游戏我买单”活动时间窗口内的最高限额下注策略,
* 并验证下注会正确挂到买单活动记录上。
*/
@@ -57,9 +57,9 @@ class AiBaccaratBetJobTest extends TestCase
}
/**
* 买单活动进行中时,AI 动用全部总资产下注,并把下注挂到活动名下。
* 买单活动时间窗口命中时,AI 按百家乐最大下注额下注,并把下注挂到活动名下。
*/
public function test_ai_bets_all_spendable_gold_when_loss_cover_event_is_active(): void
public function test_ai_bets_baccarat_max_bet_when_loss_cover_time_window_is_active(): void
{
Event::fake();
Queue::fake([SaveMessageJob::class]);
@@ -87,7 +87,7 @@ class AiBaccaratBetJobTest extends TestCase
]);
$event = BaccaratLossCoverEvent::factory()->create([
'status' => 'active',
'status' => 'scheduled',
'starts_at' => now()->subMinutes(2),
'ends_at' => now()->addMinutes(10),
]);
@@ -114,14 +114,14 @@ class AiBaccaratBetJobTest extends TestCase
'user_id' => $aiUser->id,
'loss_cover_event_id' => $event->id,
'bet_type' => 'big',
'amount' => 1200000,
'amount' => 50000,
'status' => 'pending',
]);
$this->assertDatabaseHas('baccarat_loss_cover_records', [
'event_id' => $event->id,
'user_id' => $aiUser->id,
'total_bet_amount' => 1200000,
'total_bet_amount' => 50000,
'claim_status' => 'not_eligible',
]);
@@ -132,8 +132,8 @@ class AiBaccaratBetJobTest extends TestCase
$this->assertDatabaseHas('users', [
'id' => $aiUser->id,
'jjb' => 0,
'bank_jjb' => 0,
'jjb' => 950000,
'bank_jjb' => 200000,
]);
}
}