Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix flickering spec by not providing a weak password

ulfertsb536309a57a2
diff --git a/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb b/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb
index 603459f8cc4..08880c83207 100644
--- a/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb
+++ b/modules/two_factor_authentication/spec/features/remember_cookie/login_with_remember_cookie_spec.rb
@@ -1,17 +1,17 @@
require_relative '../../spec_helper'
require_relative '../shared_2fa_examples'
-describe 'Login with 2FA remember cookie', type: :feature,
+describe 'Login with 2FA remember cookie',
+ type: :feature,
with_2fa_ee: true,
- with_config: {:'2fa' => {active_strategies: [:developer], allow_remember_for_days: 30 }},
+ with_config: { '2fa': { active_strategies: [:developer], allow_remember_for_days: 30 } },
js: true do
- let(:user_password) {'bob!' * 4}
let(:user) do
- FactoryBot.create(:user,
- login: 'bob',
- password: user_password,
- password_confirmation: user_password,
- )
+ FactoryBot.create(:user)
+ end
+ let(:user_password) do
+ # Works because the user is not reloaded
+ user.password
end
let!(:device) { FactoryBot.create :two_factor_authentication_device_sms, user: user, active: true, default: true}