Simplify factory girl configuration for mail templates
This commit is contained in:
parent
8d6d8026a6
commit
9afdb4c2c4
3 changed files with 7 additions and 11 deletions
|
@ -1,13 +1,15 @@
|
|||
FactoryGirl.define do
|
||||
factory :mail_template, class: Mails::ClosedMail do
|
||||
factory :closed_mail, class: Mails::ClosedMail do
|
||||
subject "Subject, voila voila"
|
||||
body "Blabla ceci est mon body"
|
||||
|
||||
factory :dossier_submitted_mail_template, class: Mails::ReceivedMail
|
||||
factory :received_mail, class: Mails::ReceivedMail
|
||||
|
||||
factory :dossier_refused_mail_template, class: Mails::RefusedMail
|
||||
factory :refused_mail, class: Mails::RefusedMail
|
||||
|
||||
factory :dossier_en_instruction_mail_template, class: Mails::InitiatedMail do
|
||||
factory :without_continuation_mail, class: Mails::WithoutContinuationMail
|
||||
|
||||
factory :initiated_mail, class: Mails::InitiatedMail do
|
||||
subject "[TPS] Accusé de réception pour votre dossier nº --numéro du dossier--"
|
||||
body "Votre administration vous confirme la bonne réception de votre dossier nº --numéro du dossier--"
|
||||
end
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
FactoryGirl.define do
|
||||
factory :received_mail, class: Mails::ReceivedMail do
|
||||
subject "Mail d'accusé de bonne reception de votre dossier"
|
||||
body "Votre dossier est correctement reçu"
|
||||
end
|
||||
end
|
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||
|
||||
describe 'admin/mail_templates/edit.html.haml', type: :view do
|
||||
let(:procedure) { create(:procedure) }
|
||||
let(:mail_template) { create(:mail_template, procedure: procedure) }
|
||||
let(:mail_template) { create(:received_mail, procedure: procedure) }
|
||||
let(:all_tags) { mail_template.tags }
|
||||
|
||||
before do
|
||||
|
|
Loading…
Reference in a new issue