diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /spec/features/users/login_spec.rb | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'spec/features/users/login_spec.rb')
-rw-r--r-- | spec/features/users/login_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb index 7ef11194ff9..2780549eea1 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/features/users/login_spec.rb @@ -49,15 +49,15 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do expect(current_path).to eq edit_user_password_path expect(page).to have_content('Please create a password for your new account.') - fill_in 'user_password', with: 'password' - fill_in 'user_password_confirmation', with: 'password' + fill_in 'user_password', with: Gitlab::Password.test_default + fill_in 'user_password_confirmation', with: Gitlab::Password.test_default click_button 'Change your password' expect(current_path).to eq new_user_session_path expect(page).to have_content(I18n.t('devise.passwords.updated_not_active')) fill_in 'user_login', with: user.username - fill_in 'user_password', with: 'password' + fill_in 'user_password', with: Gitlab::Password.test_default click_button 'Sign in' expect_single_session_with_authenticated_ttl @@ -210,7 +210,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do end it 'does not allow sign-in if the user password is updated before entering a one-time code' do - user.update!(password: 'new_password') + user.update!(password: "new" + Gitlab::Password.test_default) enter_code(user.current_otp) @@ -447,7 +447,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: Gitlab::Password.test_default click_button 'Sign in' expect(current_path).to eq(new_profile_password_path) @@ -456,7 +456,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do end context 'with invalid username and password' do - let(:user) { create(:user, password: 'not-the-default') } + let(:user) { create(:user, password: "not" + Gitlab::Password.test_default) } it 'blocks invalid login' do expect(authentication_metrics) @@ -767,7 +767,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: Gitlab::Password.test_default click_button 'Sign in' @@ -788,7 +788,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: Gitlab::Password.test_default click_button 'Sign in' @@ -809,7 +809,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: Gitlab::Password.test_default click_button 'Sign in' @@ -844,7 +844,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: Gitlab::Password.test_default click_button 'Sign in' fill_in 'user_otp_attempt', with: user.reload.current_otp @@ -870,7 +870,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do visit new_user_session_path fill_in 'user_login', with: user.email - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: Gitlab::Password.test_default click_button 'Sign in' expect_to_be_on_terms_page @@ -878,7 +878,7 @@ RSpec.describe 'Login', :clean_gitlab_redis_sessions do expect(current_path).to eq(new_profile_password_path) - fill_in 'user_password', with: '12345678' + fill_in 'user_password', with: Gitlab::Password.test_default fill_in 'user_new_password', with: 'new password' fill_in 'user_password_confirmation', with: 'new password' click_button 'Set new password' |