Deal gracefully with recommendations of hidden proposals
We were seeing an exceptions in the home page when displaying recommendations. This was due to trying to load tags of hidden proposals With this commit we are skipping proposals that that have been hidden, which will hopefully solve this exception
This commit is contained in:
@@ -667,6 +667,15 @@ describe User do
|
||||
expect(user.interests).to eq ["Sport"]
|
||||
end
|
||||
|
||||
it "deals gracefully with hidden proposals" do
|
||||
proposal = create(:proposal, tag_list: "Sport")
|
||||
create(:follow, followable: proposal, user: user)
|
||||
|
||||
proposal.hide
|
||||
|
||||
expect(user.interests).to eq []
|
||||
end
|
||||
|
||||
it "discards followed objects duplicated tags" do
|
||||
proposal1 = create(:proposal, tag_list: "Sport")
|
||||
proposal2 = create(:proposal, tag_list: "Sport")
|
||||
|
||||
Reference in New Issue
Block a user