From 6cceb7217376b530b009d2f88bcfd6acd87090cd Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 29 May 2019 08:32:10 +0800 Subject: [PATCH] DEV: Reduce verbosity in `TopicQuery` spec. --- spec/components/topic_query_spec.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/spec/components/topic_query_spec.rb b/spec/components/topic_query_spec.rb index 75787e592c0..32eb7ec1b13 100644 --- a/spec/components/topic_query_spec.rb +++ b/spec/components/topic_query_spec.rb @@ -257,14 +257,12 @@ describe TopicQuery do notification_level: CategoryUser.notification_levels[:muted]) topic_ids = topic_query.list_latest.topics.map(&:id) - expect(topic_ids).not_to include(muted_topic.id) - expect(topic_ids).to include(tagged_topic.id) - expect(topic_ids).to include(untagged_topic.id) + + expect(topic_ids).to contain_exactly(tagged_topic.id, untagged_topic.id) topic_ids = topic_query.list_new.topics.map(&:id) - expect(topic_ids).not_to include(muted_topic.id) - expect(topic_ids).to include(tagged_topic.id) - expect(topic_ids).to include(untagged_topic.id) + + expect(topic_ids).to contain_exactly(tagged_topic.id, untagged_topic.id) end end