From 4bc70127e49b166a62e0774cef9d8b0c5e206fb8 Mon Sep 17 00:00:00 2001 From: Toon Claes Date: Tue, 28 Mar 2017 12:17:38 +0200 Subject: 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. --- spec/mailers/previews/notify_preview.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 spec/mailers/previews/notify_preview.rb (limited to 'spec/mailers') 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 -- cgit v1.2.1