Rename changed_mr_email to reassigned_mr_email & make resque friendly

#changed_merge_request_email was really sending emails about merge
request reassignments. Updated method name to reflect that.

Update method to take ids and then perform #finds itself during mailer
queue worker kick-off.
This commit is contained in:
Robb Kidd 2012-05-14 23:42:47 -04:00
parent dd921053c8
commit 5fe75649b3
3 changed files with 11 additions and 12 deletions

View file

@ -123,9 +123,9 @@ describe Notify do
end
describe 'that are reassigned' do
before(:each) { merge_request.stub(:assignee_id_was).and_return(old_assignee.id) }
before(:each) { merge_request.stub(:assignee_id_was).and_return(previous_assignee.id) }
subject { Notify.changed_merge_request_email(recipient, merge_request) }
subject { Notify.reassigned_merge_request_email(recipient.id, merge_request.id, previous_assignee.id) }
it_behaves_like 'a multiple recipients email'
@ -134,7 +134,7 @@ describe Notify do
end
it 'contains the name of the previous assignee' do
should have_body_text /#{old_assignee.name}/
should have_body_text /#{previous_assignee.name}/
end
it 'contains the name of the new assignee' do