A platform for community discussion. Free, open, simple.
DEV: Fix a flaky test (#19705)
Alan Guo Xiang Tan81c3c746d379
diff --git a/spec/serializers/site_serializer_spec.rb b/spec/serializers/site_serializer_spec.rbindex e65b18c98c8..cd197e2a5fc 100644--- a/spec/serializers/site_serializer_spec.rb+++ b/spec/serializers/site_serializer_spec.rb@@ -247,7 +247,7 @@ RSpec.describe SiteSerializer doSiteSetting.whispers_allowed_groups = "#{group1.id}|#{group2.id}"serialized = described_class.new(Site.new(admin_guardian), scope: admin_guardian, root: false).as_json- expect(serialized[:whispers_allowed_groups_names]).to eq(["whisperers1", "whisperers2"])+ expect(serialized[:whispers_allowed_groups_names]).to contain_exactly("whisperers1", "whisperers2")endit "returns correct group names for automatic groups" do@@ -263,7 +263,7 @@ RSpec.describe SiteSerializer doSiteSetting.whispers_allowed_groups = "#{group1.id}|#{group2.id}"serialized = described_class.new(Site.new(user_guardian), scope: user_guardian, root: false).as_json- expect(serialized[:whispers_allowed_groups_names]).to eq(["whisperers1", "whisperers2"])+ expect(serialized[:whispers_allowed_groups_names]).to contain_exactly("whisperers1", "whisperers2")endit "returns nil when user is not allowed to whisper" do