Remove unnecessary attributes in proposals spec
These tests are only checking which proposals are not included in the recommendations, so we don't need to sort the included ones, just like we don't use the cached votes up attribute in the tests preceeding these ones.
This commit is contained in:
@@ -997,7 +997,7 @@ describe "Proposals" do
|
||||
end
|
||||
|
||||
scenario "do not show recommented proposal in selected proposals list" do
|
||||
create(:proposal, title: "Recommended", cached_votes_up: 10, tag_list: "Economy")
|
||||
create(:proposal, title: "Recommended", tag_list: "Economy")
|
||||
|
||||
user = create(:user)
|
||||
create(:follow, followable: create(:proposal, tag_list: "Economy"), user: user)
|
||||
|
||||
@@ -1031,8 +1031,8 @@ describe Proposal do
|
||||
end
|
||||
|
||||
it "does not return archived proposals" do
|
||||
proposal1 = create(:proposal, cached_votes_up: 5, tag_list: "Sport")
|
||||
proposal2 = create(:proposal, cached_votes_up: 5, tag_list: "Sport")
|
||||
proposal1 = create(:proposal, tag_list: "Sport")
|
||||
proposal2 = create(:proposal, tag_list: "Sport")
|
||||
archived_proposal = create(:proposal, :archived, tag_list: "Sport")
|
||||
create(:follow, followable: proposal1, user: user)
|
||||
|
||||
@@ -1042,9 +1042,9 @@ describe Proposal do
|
||||
end
|
||||
|
||||
it "does not return already supported proposals" do
|
||||
proposal1 = create(:proposal, cached_votes_up: 5, tag_list: "Health")
|
||||
proposal2 = create(:proposal, cached_votes_up: 5, tag_list: "Health")
|
||||
proposal3 = create(:proposal, cached_votes_up: 5, tag_list: "Health")
|
||||
proposal1 = create(:proposal, tag_list: "Health")
|
||||
proposal2 = create(:proposal, tag_list: "Health")
|
||||
proposal3 = create(:proposal, tag_list: "Health")
|
||||
create(:vote, votable: proposal1, voter: user)
|
||||
create(:follow, followable: proposal2, user: user)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user