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
diff options
context:
space:
mode:
authorAlex Denisov <1101.debian@gmail.com>2012-08-29 10:49:39 +0400
committerAlex Denisov <1101.debian@gmail.com>2012-08-29 10:49:39 +0400
commit4d65532158fb826b51290e0bbc30f34a1ec21d49 (patch)
tree5f7762c0011829e76a323616fb03a8999e432e64 /spec/mailers
parent8da05a4ff7cd9cd84e74bd8a017baf59135ee39d (diff)
Issue_status_changed email added
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/notify_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index 60f3231ce91..cf50b429f23 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -91,6 +91,29 @@ describe Notify do
should have_body_text /#{project_issue_path project, issue}/
end
end
+
+ describe 'status changed' do
+ let(:current_user) { Factory.create :user, email: "current@email.com" }
+ let(:status) { 'closed' }
+ subject { Notify.issue_status_changed_email(recipient.id, issue.id, status, current_user) }
+
+ it 'has the correct subject' do
+ should have_subject /changed issue ##{issue.id} \| #{issue.title}/i
+ end
+
+ it 'contains the new status' do
+ should have_body_text /#{status}/i
+ end
+
+ it 'contains the user name' do
+ should have_body_text /#{current_user.name}/i
+ end
+
+ it 'contains a link to the issue' do
+ should have_body_text /#{project_issue_path project, issue}/
+ end
+ end
+
end
context 'for merge requests' do