Skip to content

A platform for community discussion. Free, open, simple.

DEV: Fix a flake in agent importer spec (#39718)

Jarek Radosz0d1add6cbbc0
diff --git a/plugins/discourse-ai/spec/services/discourse_ai/agent_importer_spec.rb b/plugins/discourse-ai/spec/services/discourse_ai/agent_importer_spec.rb
index f16fc4f2745..491e621fed8 100644
--- a/plugins/discourse-ai/spec/services/discourse_ai/agent_importer_spec.rb
+++ b/plugins/discourse-ai/spec/services/discourse_ai/agent_importer_spec.rb
@@ -59,10 +59,8 @@ RSpec.describe DiscourseAi::AgentImporter do
expect { importer.import! }.to raise_error(
DiscourseAi::AgentImporter::ImportError,
) do |error|
- expect(error.conflicts).to eq(
- agent: "Test Agent",
- custom_tools: %w[browse_web calculator],
- )
+ expect(error.conflicts[:agent]).to eq("Test Agent")
+ expect(error.conflicts[:custom_tools]).to contain_exactly("browse_web", "calculator")
end
end
end