mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Add mailer preview
This commit is contained in:
parent
38ff7d4064
commit
1fb3a51f45
1 changed files with 38 additions and 0 deletions
38
test/mailers/previews/registrant_change_mailer_preview.rb
Normal file
38
test/mailers/previews/registrant_change_mailer_preview.rb
Normal file
|
@ -0,0 +1,38 @@
|
|||
class RegistrantChangeMailerPreview < ActionMailer::Preview
|
||||
def initialize
|
||||
@domain = Domain.first
|
||||
@new_registrant = Registrant.where.not(email: nil, country_code: nil).first
|
||||
super
|
||||
end
|
||||
|
||||
def confirmation_request
|
||||
RegistrantChangeMailer.confirm(domain: @domain,
|
||||
registrar: @domain.registrar,
|
||||
current_registrant: @domain.registrant,
|
||||
new_registrant: @new_registrant)
|
||||
end
|
||||
|
||||
def notification
|
||||
RegistrantChangeMailer.notice(domain: @domain,
|
||||
registrar: @domain.registrar,
|
||||
current_registrant: @domain.registrant,
|
||||
new_registrant: @new_registrant)
|
||||
end
|
||||
|
||||
def confirmation_accepted
|
||||
RegistrantChangeMailer.confirmed(domain: @domain,
|
||||
old_registrant: @domain.registrar)
|
||||
end
|
||||
|
||||
def confirmation_rejected
|
||||
RegistrantChangeMailer.rejected(domain: @domain,
|
||||
registrar: @domain.registrar,
|
||||
registrant: @domain.registrant)
|
||||
end
|
||||
|
||||
def confirmation_expired
|
||||
RegistrantChangeMailer.expired(domain: @domain,
|
||||
registrar: @domain.registrar,
|
||||
registrant: @domain.registrant)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue