fix(i18n): enable locale for email previews
This commit is contained in:
parent
d5425401f3
commit
4850c3b02d
1 changed files with 8 additions and 4 deletions
|
@ -83,24 +83,28 @@ class DossierMailerPreview < ActionMailer::Preview
|
||||||
"administration@example.com"
|
"administration@example.com"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def user
|
||||||
|
User.new(email: "usager@example.com", locale: I18n.locale)
|
||||||
|
end
|
||||||
|
|
||||||
def deleted_dossier
|
def deleted_dossier
|
||||||
DeletedDossier.new(dossier_id: 1, procedure: procedure)
|
DeletedDossier.new(dossier_id: 1, procedure: procedure)
|
||||||
end
|
end
|
||||||
|
|
||||||
def draft
|
def draft
|
||||||
Dossier.new(id: 47882, procedure: procedure, user: User.new(email: "usager@example.com"))
|
Dossier.new(id: 47882, procedure: procedure, user: user)
|
||||||
end
|
end
|
||||||
|
|
||||||
def dossier
|
def dossier
|
||||||
Dossier.new(id: 47882, state: :en_instruction, procedure: procedure, user: User.new(email: "usager@example.com"))
|
Dossier.new(id: 47882, state: :en_instruction, procedure: procedure, user: user)
|
||||||
end
|
end
|
||||||
|
|
||||||
def dossier_en_construction
|
def dossier_en_construction
|
||||||
Dossier.new(id: 47882, state: :en_construction, procedure: procedure, user: User.new(email: "usager@example.com"))
|
Dossier.new(id: 47882, state: :en_construction, procedure: procedure, user: user)
|
||||||
end
|
end
|
||||||
|
|
||||||
def dossier_accepte
|
def dossier_accepte
|
||||||
Dossier.new(id: 47882, state: :accepte, procedure: procedure, user: User.new(email: "usager@example.com"))
|
Dossier.new(id: 47882, state: :accepte, procedure: procedure, user: user)
|
||||||
end
|
end
|
||||||
|
|
||||||
def procedure
|
def procedure
|
||||||
|
|
Loading…
Reference in a new issue