diff options
author | Toon Claes <toon@gitlab.com> | 2017-03-28 12:17:38 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-04-06 07:07:54 +0200 |
commit | 4bc70127e49b166a62e0774cef9d8b0c5e206fb8 (patch) | |
tree | da530dd42e11827d2725da85a3b8e55f1e3f657d /spec/mailers | |
parent | aaa49c2c4e9473726814e3ce183c2e3e4072d64b (diff) | |
download | gitlab-ce-4bc70127e49b166a62e0774cef9d8b0c5e206fb8.tar.gz |
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.rb | 11 |
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 |