mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-27 15:41:10 +08:00
17 lines
540 B
Ruby
Vendored
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
|