Skip to content

Commit

Permalink
spec: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSim committed May 21, 2024
1 parent f88f6e1 commit 9d690ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/models/export_template_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
dossier.champs_public << champ_pj
end
it 'returns pj and custom name for pj' do
expect(export_template.attachment_and_path(dossier, attachment)).to eq([attachment, "DOSSIER_#{dossier.id}/superpj_justif-1.png"])
expect(export_template.attachment_and_path(dossier, attachment, champ: champ_pj)).to eq([attachment, "DOSSIER_#{dossier.id}/superpj_justif-1.png"])
end
end
context 'pj repetable' do
Expand Down Expand Up @@ -161,7 +161,7 @@
dossier.champs_public << champ_pj
end
it 'rename repetable pj' do
expect(export_template.attachment_and_path(dossier, attachment)).to eq([attachment, "DOSSIER_#{dossier.id}/pj_repet_#{dossier.id}-1.png"])
expect(export_template.attachment_and_path(dossier, attachment, champ: champ_pj)).to eq([attachment, "DOSSIER_#{dossier.id}/pj_repet_#{dossier.id}-1.png"])
end
end
end
Expand Down Expand Up @@ -272,7 +272,7 @@
let(:pdf_mention) { { "type" => "mention", "attrs" => {} } }
it "add error for pdf name" do
expect(subject.valid?).to be_falsey
expect(subject.errors.full_messages).to include "Le champ « Nom de l'export » doit être rempli"
expect(subject.errors.full_messages).to include "Le champ « Nom du dossier au format pdf » doit être rempli"
end
end
end
Expand Down

0 comments on commit 9d690ec

Please sign in to comment.