Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 2f4276a

Browse files
committed
reduce mocking to make test more stable
1 parent 848692c commit 2f4276a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spec/lib/discord/bot/persona_replier_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
end
99
let(:persona_replier) { described_class.new(interaction_body) }
1010

11+
fab!(:llm_model)
12+
fab!(:persona) { Fabricate(:ai_persona, default_llm_id: llm_model.id) }
13+
1114
before do
12-
SiteSetting.ai_discord_search_persona = "-1"
15+
SiteSetting.ai_discord_search_persona = persona.id.to_s
1316
allow_any_instance_of(DiscourseAi::AiBot::Bot).to receive(:reply).and_return(
1417
"This is a reply from bot!",
1518
)

0 commit comments

Comments
 (0)