diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-06-01 13:57:05 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-06-01 13:57:05 +0300 |
commit | 3416bc53fbebff4d1c0659f2fde6d32ff0c9df77 (patch) | |
tree | 8adbd0fc9bc918cb59516ee4627c5ba8c016a0fe /spec/features | |
parent | 4a50e1f0514f318d10a273d1c252d855cfb106fb (diff) | |
parent | a602df303175aaaf1d5b60a2c009f5e259d187db (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.rb | 8 |
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') |