views: fix warning message about incomplete fields for attestation

The labels for the champs and private champs were inverted.
This commit is contained in:
maatinito 2021-03-23 12:45:55 +00:00 committed by Pierre de La Morinerie
parent 922e157e16
commit cc19453f68
2 changed files with 10 additions and 7 deletions

View file

@ -1,7 +1,7 @@
describe 'instructeurs/dossiers/state_button_motivation.html.haml', type: :view do
let(:dossier) { create(:dossier, :en_instruction) }
subject! do
subject do
render(
'instructeurs/dossiers/state_button_motivation.html.haml',
dossier: dossier,
@ -14,12 +14,15 @@ describe 'instructeurs/dossiers/state_button_motivation.html.haml', type: :view
)
end
context 'with an attestation preview' do
let(:dossier) { create :dossier, :accepte, :with_attestation }
it { expect(rendered).to have_link(href: apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier)) }
context 'without attestation' do
it { expect(subject).not_to have_link(href: apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier)) }
end
context 'without an attestation preview' do
it { expect(rendered).not_to have_link(href: apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier)) }
context 'with an attestation' do
let(:dossier) { create :dossier, :accepte, :with_attestation }
it 'includes a link to preview the attestation' do
expect(subject).to have_link(href: apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier))
end
end
end