修复新人欢迎被本地清屏过滤

This commit is contained in:
pllx
2026-04-27 14:13:23 +08:00
parent 3d8e270df4
commit dd9ae46c04
4 changed files with 19 additions and 2 deletions
+5
View File
@@ -1009,6 +1009,7 @@ class ChatControllerTest extends TestCase
$response->assertOk();
$history = collect($response->viewData('historyMessages'));
$initialWelcomeMessages = collect($response->viewData('initialWelcomeMessages'));
$newbieBonusMessage = $history->first(fn (array $message): bool => ($message['welcome_kind'] ?? '') === 'newbie_bonus');
$aiWelcomeMessage = $history->first(fn (array $message): bool => ($message['welcome_kind'] ?? '') === 'ai_newbie_welcome');
@@ -1024,6 +1025,10 @@ class ChatControllerTest extends TestCase
$this->assertSame($user->username, $entryMessage['welcome_user']);
$this->assertTrue($user->fresh()->has_received_new_gift);
$this->assertSame(6666, (int) $user->fresh()->jjb);
$this->assertSame(
['newbie_bonus', 'ai_newbie_welcome', 'entry_broadcast'],
$initialWelcomeMessages->pluck('welcome_kind')->all(),
);
}
/**