Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-06-01 13:57:05 +0300
committerDouwe Maan <douwe@gitlab.com>2016-06-01 13:57:05 +0300
commit3416bc53fbebff4d1c0659f2fde6d32ff0c9df77 (patch)
tree8adbd0fc9bc918cb59516ee4627c5ba8c016a0fe /spec/features
parent4a50e1f0514f318d10a273d1c252d855cfb106fb (diff)
parenta602df303175aaaf1d5b60a2c009f5e259d187db (diff)
Merge branch 'rs-remember-me-2fa' into 'master'
Pass the "Remember me" value to the 2FA token form Prior, if a user had 2FA enabled and checked the "Remember me" field, the setting was ignored because the OTP input was on a new form and the value was never passed. Closes #18000 See merge request !4369
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/login_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/features/login_spec.rb b/spec/features/login_spec.rb
index 8c38dd5b122..a7dc3b2701b 100644
--- a/spec/features/login_spec.rb
+++ b/spec/features/login_spec.rb
@@ -32,7 +32,7 @@ feature 'Login', feature: true do
let(:user) { create(:user, :two_factor) }
before do
- login_with(user)
+ login_with(user, remember: true)
expect(page).to have_content('Two-factor Authentication')
end
@@ -52,6 +52,12 @@ feature 'Login', feature: true do
expect(current_path).to eq root_path
end
+ it 'persists remember_me value via hidden field' do
+ field = first('input#user_remember_me', visible: false)
+
+ expect(field.value).to eq '1'
+ end
+
it 'blocks login with invalid code' do
enter_code('foo')
expect(page).to have_content('Invalid two-factor code')