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

Remove unnecessary stub

Oliver Günther6d4b20304a4d
diff --git a/spec/controllers/account_controller_spec.rb b/spec/controllers/account_controller_spec.rb
index c4bed25654b..3d68466637e 100644
--- a/spec/controllers/account_controller_spec.rb
+++ b/spec/controllers/account_controller_spec.rb
@@ -519,8 +519,6 @@ RSpec.describe AccountController, :skip_2fa_stage do
context "with a valid token" do
before do
- allow(controller).to receive(:allow_lost_password_recovery?).and_return(true)
-
post :lost_password, params: { token: token.value }
end
@@ -732,7 +730,7 @@ RSpec.describe AccountController, :skip_2fa_stage do
end
it "doesn't activate the user but sends out a token instead" do
- expect(User.find_by_login("register")).not_to be_active # rubocop:disable Rails/DynamicFindBy
+ expect(User.find_by_login("register")).not_to be_active
token = Token::Invitation.last
expect(token.user.mail).to eq("[email protected]")
expect(token).not_to be_expired
@@ -778,7 +776,7 @@ RSpec.describe AccountController, :skip_2fa_stage do
end
it "doesn't activate the user" do
- expect(User.find_by_login("register")).not_to be_active # rubocop:disable Rails/DynamicFindBy
+ expect(User.find_by_login("register")).not_to be_active
end
it "calls the user_registered callback" do