discourse/plugins/discourse-ai/spec/lib/agents/sql_helper_spec.rb
Sam e3fae646d4
DEV: AI persona to agent migration (#38319)
Co-authored-by: Keegan George <kgeorge13@gmail.com>
2026-03-10 15:59:45 +11:00

17 lines
540 B
Ruby
Vendored

# frozen_string_literal: true
RSpec.describe DiscourseAi::Agents::SqlHelper do
subject(:sql_helper) { described_class.new }
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::Agents::Tools::DbSchema])
end
end