summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-04-10 10:01:34 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-04-10 10:01:34 +0000
commit94668490a141568dbab604540b843c54e6e6a7e5 (patch)
tree5e90c77ba79468b2d4e76732c56ab63d518fd732
parentc98add157732004d9a2eaa39770edf84eaca6896 (diff)
parent3a33a795718e570fbce92f481b0cf663a9158941 (diff)
downloadgitlab-ce-94668490a141568dbab604540b843c54e6e6a7e5.tar.gz
Merge branch '30676-project-export-email' into 'master'
Fix email not being sent after project export Closes #30676 See merge request !10578
-rw-r--r--app/views/notify/project_was_exported_email.html.haml2
-rw-r--r--spec/services/notification_service_spec.rb16
2 files changed, 17 insertions, 1 deletions
diff --git a/app/views/notify/project_was_exported_email.html.haml b/app/views/notify/project_was_exported_email.html.haml
index 76440926a2b..3def26342a1 100644
--- a/app/views/notify/project_was_exported_email.html.haml
+++ b/app/views/notify/project_was_exported_email.html.haml
@@ -2,7 +2,7 @@
Project #{@project.name} was exported successfully.
%p
The project export can be downloaded from:
- = link_to download_export_namespace_project_url(@project.namespace, @project), rel: 'nofollow', download: '', do
+ = link_to download_export_namespace_project_url(@project.namespace, @project), rel: 'nofollow', download: '' do
= @project.name_with_namespace + " export"
%p
The download link will expire in 24 hours.
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index 617c8eaf3d5..989fd90cda9 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -1181,6 +1181,22 @@ describe NotificationService, services: true do
should_not_email(@u_disabled)
end
end
+
+ describe '#project_exported' do
+ it do
+ notification.project_exported(project, @u_disabled)
+
+ should_only_email(@u_disabled)
+ end
+ end
+
+ describe '#project_not_exported' do
+ it do
+ notification.project_not_exported(project, @u_disabled, ['error'])
+
+ should_only_email(@u_disabled)
+ end
+ end
end
describe 'GroupMember' do