Add InviteMailerPreview
This commit is contained in:
parent
e4883aa152
commit
9842142a9a
1 changed files with 33 additions and 0 deletions
33
spec/mailers/previews/invite_mailer_preview.rb
Normal file
33
spec/mailers/previews/invite_mailer_preview.rb
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
class InviteMailerPreview < ActionMailer::Preview
|
||||||
|
def invite_user
|
||||||
|
InviteMailer.invite_user(invite)
|
||||||
|
end
|
||||||
|
|
||||||
|
def invite_guest
|
||||||
|
InviteMailer.invite_guest(invite)
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def invite
|
||||||
|
Invite.new(
|
||||||
|
id: 10,
|
||||||
|
dossier: dossier,
|
||||||
|
user: invited_user,
|
||||||
|
email: invited_user.email,
|
||||||
|
email_sender: 'sender@gouv.fr'
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
def dossier
|
||||||
|
Dossier.new(procedure: procedure)
|
||||||
|
end
|
||||||
|
|
||||||
|
def procedure
|
||||||
|
Procedure.new(libelle: 'Permis de construire en zone inondable')
|
||||||
|
end
|
||||||
|
|
||||||
|
def invited_user
|
||||||
|
User.new(email: 'Invité@gouv.fr')
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue