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.
This commit is contained in:
Javi Martín
2019-09-27 22:41:11 +02:00
parent 1cfc6c121d
commit ce2b81f790

View File

@@ -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)