summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-05-25 17:53:26 -0400
committerRobert Speicher <rspeicher@gmail.com>2016-06-16 20:10:52 -0400
commit7b66dcf65e240723ae6c8772492bbb79cf4a348e (patch)
tree1cbb85ca5f201dc2d28e40f1f3fdc541441911ea
parent933cd3478d8930fa5472d509d78bb7dd481d2360 (diff)
downloadgitlab-ce-7b66dcf65e240723ae6c8772492bbb79cf4a348e.tar.gz
Add previews for all customized Devise emails
-rw-r--r--spec/mailers/previews/devise_mailer_preview.rb23
1 files changed, 21 insertions, 2 deletions
diff --git a/spec/mailers/previews/devise_mailer_preview.rb b/spec/mailers/previews/devise_mailer_preview.rb
index dc3062a4332..d6588efc486 100644
--- a/spec/mailers/previews/devise_mailer_preview.rb
+++ b/spec/mailers/previews/devise_mailer_preview.rb
@@ -1,11 +1,30 @@
class DeviseMailerPreview < ActionMailer::Preview
def confirmation_instructions_for_signup
- user = User.new(name: 'Jane Doe', email: 'signup@example.com')
- DeviseMailer.confirmation_instructions(user, 'faketoken', {})
+ DeviseMailer.confirmation_instructions(unsaved_user, 'faketoken', {})
end
def confirmation_instructions_for_new_email
user = User.last
+ user.unconfirmed_email = 'unconfirmed@example.com'
+
DeviseMailer.confirmation_instructions(user, 'faketoken', {})
end
+
+ def reset_password_instructions
+ DeviseMailer.reset_password_instructions(unsaved_user, 'faketoken', {})
+ end
+
+ def unlock_instructions
+ DeviseMailer.unlock_instructions(unsaved_user, 'faketoken', {})
+ end
+
+ def password_change
+ DeviseMailer.password_change(unsaved_user, {})
+ end
+
+ private
+
+ def unsaved_user
+ User.new(name: 'Jane Doe', email: 'jdoe@example.com')
+ end
end