Ajoute l'information lorsqu'un usager s'authentifie via France Connect
This commit is contained in:
parent
18d0a657a7
commit
e6c1a20329
8 changed files with 45 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue