Commit 40e16b22 authored by Patricio Cano's avatar Patricio Cano

Change order of stubbing to fix tests

parent 54672605
......@@ -115,8 +115,8 @@ feature 'Login', feature: true do
end
it 'should show 2FA prompt after OAuth login' do
user = create(:omniauth_user, :two_factor, extern_uid: 'my-uid', provider: 'saml')
stub_omniauth_config(enabled: true, auto_link_saml_user: true, allow_single_sign_on: ['saml'], providers: [OpenStruct.new(name: 'saml', label: 'saml', args: {})])
user = create(:omniauth_user, :two_factor, extern_uid: 'my-uid', provider: 'saml')
login_via('saml', user, 'my-uid')
expect(page).to have_content('Two-Factor Authentication')
......
......@@ -40,7 +40,6 @@ module LoginHelpers
def login_via(provider, user, uid)
mock_auth_hash(provider, uid, user.email)
visit new_user_session_path
#page.find('.oauth-image-link').click
click_link provider
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment