Améliorations après retours PR
This commit is contained in:
parent
878f58e00c
commit
57dfe2b0f6
17 changed files with 72 additions and 50 deletions
|
@ -36,21 +36,12 @@ describe 'users/dossiers/brouillon', type: :view do
|
|||
it { is_expected.not_to have_link("Télécharger le guide de la démarche") }
|
||||
end
|
||||
|
||||
context 'when a dossier is for_tiers and the dossier is in brouillon with email notification' do
|
||||
context 'when a dossier is for_tiers and the dossier en construction with email notification' do
|
||||
let(:dossier) { create(:dossier, :for_tiers_with_notification) }
|
||||
|
||||
it 'displays the informations of the mandataire and the beneficiaire email' do
|
||||
expect(rendered).to have_text("#{dossier.mandataire_full_name} agit pour le compte du bénéficiaire :")
|
||||
expect(rendered).to have_text("Email :\n\n\n#{dossier.individual.email}")
|
||||
end
|
||||
end
|
||||
|
||||
context 'when a dossier is for_tiers and the dossier is in brouillon with no notification' do
|
||||
let!(:dossier) { create(:dossier, :for_tiers_without_notification) }
|
||||
|
||||
it 'displays the informations of the mandataire and do not display the beneficiary email' do
|
||||
expect(rendered).to have_text("#{dossier.mandataire_full_name} agit pour le compte du bénéficiaire :")
|
||||
expect(rendered).not_to have_text("Email :\n\n\n#{dossier.individual.email}")
|
||||
it 'displays the informations of the beneficiaire' do
|
||||
expect(rendered).to have_text("Identité du demandeur")
|
||||
expect(rendered).not_to have_text("Votre identité")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -53,8 +53,9 @@ describe 'users/dossiers/demande', type: :view do
|
|||
let(:dossier) { create(:dossier, :en_construction, :for_tiers_with_notification) }
|
||||
|
||||
it 'displays the informations of the mandataire' do
|
||||
expect(rendered).to have_text('Email du mandataire')
|
||||
expect(rendered).to have_text("#{dossier.mandataire_full_name} agit pour le compte du bénéficiaire :")
|
||||
expect(rendered).to have_text('Identité du mandataire')
|
||||
expect(rendered).to have_text(dossier.mandataire_first_name.to_s)
|
||||
expect(rendered).to have_text(dossier.mandataire_last_name.to_s)
|
||||
expect(rendered).to have_text(dossier.individual.email.to_s)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue