diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-05-26 00:53:26 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-06-17 03:10:52 +0300 |
commit | 7b66dcf65e240723ae6c8772492bbb79cf4a348e (patch) | |
tree | 1cbb85ca5f201dc2d28e40f1f3fdc541441911ea /spec/mailers | |
parent | 933cd3478d8930fa5472d509d78bb7dd481d2360 (diff) |
Add previews for all customized Devise emails
Diffstat (limited to 'spec/mailers')
-rw-r--r-- | spec/mailers/previews/devise_mailer_preview.rb | 23 |
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 |