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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-18 15:30:04 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-18 15:30:04 +0400
commitfc3878c03461a1b75a30332756544b2e10b77917 (patch)
treeac374bf3035076104443f0d3eadebb8f47734308 /spec/mailers
parent5f85d6d1cea2e9f3557206b97cef15676ea2d14c (diff)
Email on push mailer spec
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/notify_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb
index d287239cfe3..b1e53486816 100644
--- a/spec/mailers/notify_spec.rb
+++ b/spec/mailers/notify_spec.rb
@@ -391,4 +391,28 @@ describe Notify do
should have_body_text /#{example_site_path}/
end
end
+
+ describe 'email on push' do
+ let(:example_site_path) { root_path }
+ let(:user) { create(:user) }
+ let(:compare) { Gitlab::Git::Compare.new(project.repository.raw_repository, 'cd5c4bac', 'b1e6a9db') }
+
+ subject { Notify.repository_push_email(project.id, 'devs@company.name', user.id, 'master', compare) }
+
+ it 'is sent to recipient' do
+ should deliver_to 'devs@company.name'
+ end
+
+ it 'has the correct subject' do
+ should have_subject /New push to repository/
+ end
+
+ it 'includes commits list' do
+ should have_body_text /tree css fixes/
+ end
+
+ it 'includes diffs' do
+ should have_body_text /Checkout wiki pages for installation information/
+ end
+ end
end