Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRobb Kidd <robb@thekidds.org>2012-05-15 07:27:52 +0400
committerRobb Kidd <robb@thekidds.org>2012-05-16 06:35:53 +0400
commitdd921053c8ef598bad3c7a16331c296d581f0080 (patch)
treec6ad56e1a44d1d816f3c68d90ffe3268a5c79453 /spec
parent345f176a7458ec1f99a2911988f0c4c0cb4d2704 (diff)
Rename changed_issue_email to reassigned_issue_email & make resque friendly
#changed_issue_email was really sending emails about issue reassignments. Updated method name to reflect that. Update method to take ids and then perform #finds itself during mailer queue worker kick-off.
Diffstat (limited to 'spec')
-rw-r--r--spec/mailers/notify_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 102db485a70..8c896085226 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -47,7 +47,7 @@ describe Notify do
context 'for a project' do
describe 'items that are assignable, the email' do
let(:assignee) { Factory.create(:user, :email => 'assignee@example.com') }
- let(:old_assignee) { Factory.create(:user, :name => 'Old Assignee Guy') }
+ let(:previous_assignee) { Factory.create(:user, :name => 'Previous Assignee') }
shared_examples 'an assignee email' do
it 'is sent to the assignee' do
@@ -73,9 +73,9 @@ describe Notify do
end
describe 'that have been reassigned' do
- before(:each) { issue.stub(:assignee_id_was).and_return(old_assignee.id) }
+ before(:each) { issue.stub(:assignee_id_was).and_return(previous_assignee.id) }
- subject { Notify.changed_issue_email(recipient, issue) }
+ subject { Notify.reassigned_issue_email(recipient.id, issue.id, previous_assignee.id) }
it_behaves_like 'a multiple recipients email'
@@ -84,7 +84,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