diff options
Diffstat (limited to 'spec/support/helpers/login_helpers.rb')
-rw-r--r-- | spec/support/helpers/login_helpers.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/helpers/login_helpers.rb b/spec/support/helpers/login_helpers.rb index 87a1f5459ec..44237b821c3 100644 --- a/spec/support/helpers/login_helpers.rb +++ b/spec/support/helpers/login_helpers.rb @@ -119,6 +119,16 @@ module LoginHelpers click_button "oauth-login-#{provider}" end + def sign_in_using_ldap!(user, ldap_tab, ldap_name) + visit new_user_session_path + click_link ldap_tab + fill_in 'username', with: user.username + fill_in 'password', with: user.password + within("##{ldap_name}") do + click_button 'Sign in' + end + end + def register_via(provider, uid, email, additional_info: {}) mock_auth_hash(provider, uid, email, additional_info: additional_info) visit new_user_registration_path |