add feature test on france connect
This commit is contained in:
parent
8445944b76
commit
f4e3ec1a72
1 changed files with 11 additions and 0 deletions
|
@ -12,5 +12,16 @@ feature 'France Connect Connexion' do
|
||||||
expect(page).to have_css('a#france_connect')
|
expect(page).to have_css('a#france_connect')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'and click on france connect link' do
|
||||||
|
let(:code) { 'plop' }
|
||||||
|
before do
|
||||||
|
allow_any_instance_of(FranceConnectClient).to receive(:authorization_uri).and_return(france_connect_callback_path(code: code))
|
||||||
|
allow(FranceConnectService).to receive(:retrieve_user_informations).and_return(Hashie::Mash.new(email: 'patator@cake.com'))
|
||||||
|
page.find_by_id('france_connect').click
|
||||||
|
end
|
||||||
|
scenario 'he is redirected to france connect' do
|
||||||
|
expect(page).to have_content('Vos dossiers')
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in a new issue