Skip to content

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

FIX: Flaky test for FormTemplatesController (#32351)

Juan David Martínez Cubillos4cd7ca677f69
diff --git a/spec/requests/form_templates_controller_spec.rb b/spec/requests/form_templates_controller_spec.rb
index 957d7d23f56..12f4ceb7f70 100644
--- a/spec/requests/form_templates_controller_spec.rb
+++ b/spec/requests/form_templates_controller_spec.rb
@@ -114,12 +114,11 @@ RSpec.describe FormTemplatesController do
expect(parsed_template[0]["attributes"]["tag_group"]).to eq(tag_group1.name)
expect(parsed_template[1]["attributes"]["tag_group"]).to eq(tag_group2.name)
-
expect(parsed_template[0]["attributes"]["tag_choices"]).to eq(
- { "tag1" => "Tag 1 custom Translation" },
+ { tag1.name => tag1.description },
)
expect(parsed_template[1]["attributes"]["tag_choices"]).to eq(
- { "tag2" => "Tag 2 custom Translation" },
+ { tag2.name => tag2.description },
)
expect(parsed_template[0]["choices"]).to eq(%w[tag1 tag3])
expect(parsed_template[1]["choices"]).to eq(%w[tag2 tag4])