From 5005482dd8a7d2c92c77b68a6e617749cea2b725 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 19 Mar 2018 15:24:17 +0530 Subject: [PATCH] Fix random spec failures --- spec/models/tag_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/models/tag_spec.rb b/spec/models/tag_spec.rb index 23602878b26..1d792c10a22 100644 --- a/spec/models/tag_spec.rb +++ b/spec/models/tag_spec.rb @@ -123,8 +123,7 @@ describe Tag do SiteSetting.allow_staff_to_tag_pms = true tags = described_class.pm_tags(guardian: Guardian.new(admin), allowed_user: regular_user) expect(tags.length).to eq(2) - expect(tags[0][:id]).to eq("tag-0") - expect(tags[1][:text]).to eq("tag-1") + expect(tags.map { |t| t[:id] }).to contain_exactly("tag-0", "tag-1") end end