views: make the "Voir l'attestation" UI simpler

Instead of adding a button, just turn the "attestation" text into a link
This commit is contained in:
Pierre de La Morinerie 2019-10-14 15:38:04 +02:00
parent 0064c2c610
commit 0e5f66c5ba
2 changed files with 5 additions and 6 deletions

View file

@ -16,11 +16,10 @@ describe 'instructeurs/dossiers/state_button_motivation.html.haml', type: :view
context 'with an attestation preview' do
let(:dossier) { create :dossier, :accepte, :with_attestation }
it { expect(rendered).to have_text("Voir l'attestation") }
it { expect(rendered).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_text("envoie automatiquement une attestation") }
it { expect(rendered).not_to have_text("Voir l'attestation") }
it { expect(rendered).not_to have_link(href: apercu_attestation_instructeur_dossier_path(dossier.procedure, dossier)) }
end
end