summaryrefslogtreecommitdiff
path: root/spec/support/helpers/login_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/login_helpers.rb')
-rw-r--r--spec/support/helpers/login_helpers.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/helpers/login_helpers.rb b/spec/support/helpers/login_helpers.rb
index 6bbee6a7926..67315b9d81e 100644
--- a/spec/support/helpers/login_helpers.rb
+++ b/spec/support/helpers/login_helpers.rb
@@ -94,8 +94,8 @@ module LoginHelpers
# remember - Whether or not to check "Remember me" (default: false)
# two_factor_auth - If two-factor authentication is enabled (default: false)
# password - password to attempt to login with (default: user.password)
- def gitlab_sign_in_with(user, remember: false, two_factor_auth: false, password: nil)
- visit new_user_session_path
+ def gitlab_sign_in_with(user, remember: false, two_factor_auth: false, password: nil, visit: true)
+ visit new_user_session_path if visit
fill_in "user_login", with: user.email
fill_in "user_password", with: (password || user.password)