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

Commit 8c962d7

Browse files
committed
add system test
1 parent 42905ff commit 8c962d7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/system/llms/ai_llm_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@
7272
end
7373

7474
context "when changing the provider" do
75+
it "has the correct provider params when visiting the edit page" do
76+
llm = Fabricate(:llm_model, provider: "open_ai", provider_params: {})
77+
visit "/admin/plugins/discourse-ai/ai-llms/#{llm.id}/edit"
78+
79+
expect(form).to have_field_with_name("provider_params.organization")
80+
expect(form).to have_field_with_name("provider_params.disable_native_tools")
81+
expect(form).to have_field_with_name("provider_params.disable_streaming")
82+
expect(form).to have_field_with_name("provider_params.reasoning_effort")
83+
end
7584
it "correctly changes the provider params" do
7685
visit "/admin/plugins/discourse-ai/ai-llms"
7786
find("[data-llm-id='none'] button").click()

0 commit comments

Comments
 (0)