Skip to content

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

DEV: Fix flaky test (#21880)

Alan Guo Xiang Tan049415745278
diff --git a/spec/lib/topics_filter_spec.rb b/spec/lib/topics_filter_spec.rb
index 54631f484e6..c8000626f8d 100644
--- a/spec/lib/topics_filter_spec.rb
+++ b/spec/lib/topics_filter_spec.rb
@@ -1246,13 +1246,13 @@ RSpec.describe TopicsFilter do
end
describe "when query string is `order:#{order}-invalid`" do
- it "should return topics ordered by the default order" do
+ it "should return topics ordered by the database's default order" do
expect(
TopicsFilter
.new(guardian: Guardian.new)
.filter_from_query_string("order:#{order}-invalid")
.pluck(:id),
- ).to eq(Topic.all.order(:id).pluck(:id))
+ ).to contain_exactly(*Topic.all.pluck(:id))
end
end
end