discourse-ai/spec/lib/personas/sql_helper_spec.rb
Jarek Radosz f231aad8b5
DEV: Disable the plugin by default (#1511)
…and preserve the current setting on existing sites
2025-07-22 11:05:52 +01:00

17 lines
528 B
Ruby

# frozen_string_literal: true
RSpec.describe DiscourseAi::Personas::SqlHelper do
let(:sql_helper) { subject }
before { enable_current_plugin }
it "renders schema" do
prompt = sql_helper.system_prompt
expect(prompt).to include("posts(")
expect(prompt).to include("topics(")
expect(prompt).not_to include("translation_key") # not a priority table
expect(prompt).to include("user_api_keys") # not a priority table
expect(sql_helper.tools).to eq([DiscourseAi::Personas::Tools::DbSchema])
end
end