From ce2b81f7905eee8176a87e2211e58dd9b82a32b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 27 Sep 2019 22:41:11 +0200 Subject: [PATCH] Fix typo in communities spec We were using the same order for most commented and for newest, so the test wasn't as effective as it could be. --- spec/features/communities_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/features/communities_spec.rb b/spec/features/communities_spec.rb index a3d14ecd4..5e67056d6 100644 --- a/spec/features/communities_spec.rb +++ b/spec/features/communities_spec.rb @@ -50,15 +50,15 @@ describe "Communities" do community = proposal.community topic1 = create(:topic, community: community) topic2 = create(:topic, community: community) - topic2_comment = create(:comment, commentable: topic2) topic3 = create(:topic, community: community) + topic1_comment = create(:comment, commentable: topic1) topic3_comment = create(:comment, commentable: topic3) topic3_comment = create(:comment, commentable: topic3) visit community_path(community, order: :most_commented) - expect(topic3.title).to appear_before(topic2.title) - expect(topic2.title).to appear_before(topic1.title) + expect(topic3.title).to appear_before(topic1.title) + expect(topic1.title).to appear_before(topic2.title) visit community_path(community, order: :oldest)