Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
AO3-5251: Add spam-specific hidden work email #3171
Conversation
| + @work = Work.find_by(id: creation_id) | ||
| + | ||
| + mail( | ||
| + to: @user.email, |
houndci-bot
Nov 19, 2017
Indent the first parameter one step more than the start of the previous line.
elzj
added
Awaiting review
Priority: Broken on Test (High)
labels
Nov 19, 2017
sarken
reviewed
Nov 19, 2017
Looks good! But is there a way to test that the proper email is sent when a work is marked as spam? I don't imagine it will work in the Cucumber feature because of the sideways we we have to create the spam work, but maybe in RSpec?
| - it "does not automatically hide spam works" do | ||
| - @work.update_attributes!(spam: true) | ||
| + it "does not automatically hide spam works and does not send an email" do | ||
| + expect { @work.update_attributes!(spam: true) }. |
houndci-bot
Nov 19, 2017
Parenthesize the param change { ActionMailer::Base.deliveries.count } to make sure that the block will be associated with the change method call.
elzj commentedNov 19, 2017
Issue
https://otwarchive.atlassian.net/browse/AO3-5251
Purpose
Adds a more specific email that goes out when a work is hidden as spam.
Testing
Mark a work as spam and determine that the correct email arrives.