mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-04 15:13:41 +08:00
27 lines
599 B
Ruby
27 lines
599 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe UserOption do
|
|
fab!(:user)
|
|
fab!(:llm_model)
|
|
fab!(:group)
|
|
fab!(:ai_agent) do
|
|
Fabricate(:ai_agent, allowed_group_ids: [group.id], default_llm_id: llm_model.id)
|
|
end
|
|
|
|
before do
|
|
enable_current_plugin
|
|
assign_fake_provider_to(:ai_default_llm_model)
|
|
SiteSetting.ai_bot_enabled = true
|
|
end
|
|
|
|
describe "#ai_search_discoveries" do
|
|
before do
|
|
SiteSetting.ai_discover_agent = ai_agent.id
|
|
group.add(user)
|
|
end
|
|
|
|
it "is present" do
|
|
expect(described_class.new.ai_search_discoveries).to eq(true)
|
|
end
|
|
end
|
|
end
|