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 factories

Klaus Zandersd2eada09adae
diff --git a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb
index a8233f4c85d..87229cd231f 100644
--- a/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb
+++ b/modules/two_factor_authentication/spec/controllers/two_factor_authentication/authentication_controller_spec.rb
@@ -63,7 +63,7 @@ RSpec.describe TwoFactorAuthentication::AuthenticationController, with_settings:
end
context 'with a non-default device' do
- let!(:device) { create(:two_factor_authentication_device_sms, user:, default: false, channel: :sms) }
+ let!(:device) { create(:two_factor_authentication_device_sms, user:, make_default: false, channel: :sms) }
before do
session[:authenticated_user_id] = user.id
diff --git a/modules/two_factor_authentication/spec/factories/two_factor_authentication_device_factory.rb b/modules/two_factor_authentication/spec/factories/two_factor_authentication_device_factory.rb
index 661aaf49356..33c211ce6b8 100644
--- a/modules/two_factor_authentication/spec/factories/two_factor_authentication_device_factory.rb
+++ b/modules/two_factor_authentication/spec/factories/two_factor_authentication_device_factory.rb
@@ -7,7 +7,7 @@ FactoryBot.define do
identifier { 'Phone number (+49 123456789)' }
transient do
- make_default { false }
+ make_default { true }
end
callback(:after_create) do |device, evaluator|
@@ -22,7 +22,7 @@ FactoryBot.define do
identifier { 'TOTP device' }
transient do
- make_default { false }
+ make_default { true }
end
callback(:after_create) do |device, evaluator|
@@ -40,7 +40,7 @@ FactoryBot.define do
webauthn_public_key { "bar" }
transient do
- make_default { false }
+ make_default { true }
end
callback(:after_create) do |device, evaluator|