Fix randomly failing spec.

approved
heisentest
#1

Fix randomly failing spec.

diff --git a/spec/components/topics_bulk_action_spec.rb b/spec/components/topics_bulk_action_spec.rb
index 4a0263b..998f95d 100644
--- a/spec/components/topics_bulk_action_spec.rb
+++ b/spec/components/topics_bulk_action_spec.rb
@@ -228,7 +228,7 @@ describe TopicsBulkAction do
         topic_ids = tba.perform!
         expect(topic_ids).to eq([])
         topic.reload
-        expect(topic.tags.map(&:name)).to eq([tag1.name, tag2.name])
+        expect(topic.tags.map(&:name)).to contain_exactly(tag1.name, tag2.name)
       end
     end
   end

GitHub sha: b87c5eb1

2 Likes
#2

Nice one, shows DB ordering related heisentest

1 Like
Approved #3