Revert "Merge pull request #5710 from betagouv/revert-5705-feat/5701"

This reverts commit aae77c77b0, reversing
changes made to 4c2c5c630c.
This commit is contained in:
kara Diaby 2020-11-02 11:37:21 +01:00
parent 70f30560f0
commit 4b2e3b5be7
8 changed files with 45 additions and 1 deletions

View file

@ -68,6 +68,10 @@ feature 'France Connect Particulier Connexion' do
scenario 'he is redirected to user dossiers page' do
expect(page).to have_content('Dossiers')
end
scenario 'the updated_at date is well updated' do
expect(france_connect_information.updated_at).not_to eq(france_connect_information.created_at)
end
end
end

View file

@ -18,4 +18,19 @@ describe 'instructeurs/dossiers/show.html.haml', type: :view do
expect(rendered).to have_text('Identité')
expect(rendered).to have_text('Demande')
end
context 'when the user is logged in with france connect' do
let(:france_connect_information) { build(:france_connect_information) }
let(:user) { build(:user, france_connect_information: france_connect_information) }
let(:procedure1) { create(:procedure, :with_type_de_champ, for_individual: true) }
let(:dossier) { create(:dossier, procedure: procedure1, user: user) }
before do
render
end
it 'fills the individual with the informations from France Connect' do
expect(rendered).to have_text("Le dossier a été déposé par le compte de #{dossier.individual.prenom} #{dossier.individual.nom}, authentifié par France Connect le #{dossier.individual.updated_at.strftime('%d/%m/%Y')}")
end
end
end

View file

@ -33,4 +33,19 @@ describe 'users/dossiers/demande.html.haml', type: :view do
it { expect(rendered).not_to have_text('Déposé le') }
end
context 'when the user is logged in with france connect' do
let(:france_connect_information) { build(:france_connect_information) }
let(:user) { build(:user, france_connect_information: france_connect_information) }
let(:procedure1) { create(:procedure, :with_type_de_champ, for_individual: true) }
let(:dossier) { create(:dossier, procedure: procedure1, user: user) }
before do
render
end
it 'fills the individual with the informations from France Connect' do
expect(rendered).to have_text("Le dossier a été déposé par le compte de #{dossier.individual.prenom} #{dossier.individual.nom}, authentifié par France Connect le #{dossier.individual.updated_at.strftime('%d/%m/%Y')}")
end
end
end