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:
authorToon Claes <toon@gitlab.com>2017-03-28 13:17:38 +0300
committerToon Claes <toon@gitlab.com>2017-04-06 08:07:54 +0300
commit4bc70127e49b166a62e0774cef9d8b0c5e206fb8 (patch)
treeda530dd42e11827d2725da85a3b8e55f1e3f657d /spec/mailers
parentaaa49c2c4e9473726814e3ce183c2e3e4072d64b (diff)
Make it possible to preview pipeline success/failed emails
Visit `/rails/mailers/notify` on your local running GitLab instance to show a preview pipeline success emails.
Diffstat (limited to 'spec/mailers')
-rw-r--r--spec/mailers/previews/notify_preview.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/mailers/previews/notify_preview.rb b/spec/mailers/previews/notify_preview.rb
new file mode 100644
index 00000000000..0e1ccb5b847
--- /dev/null
+++ b/spec/mailers/previews/notify_preview.rb
@@ -0,0 +1,11 @@
+class NotifyPreview < ActionMailer::Preview
+ def pipeline_success_email
+ pipeline = Ci::Pipeline.last
+ Notify.pipeline_success_email(pipeline, pipeline.user.try(:email))
+ end
+
+ def pipeline_failed_email
+ pipeline = Ci::Pipeline.last
+ Notify.pipeline_failed_email(pipeline, pipeline.user.try(:email))
+ end
+end