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.
This commit is contained in:
Toon Claes 2017-03-28 12:17:38 +02:00
parent aaa49c2c4e
commit 4bc70127e4
1 changed files with 11 additions and 0 deletions

View File

@ -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