Skip to content

Commit 7aaf780

Browse files
BenAkroydtvdeyen
authored andcommitted
fix: update mailer mock to use deliver_now for Devise 5 compatibility
Devise 5 changed send_devise_notification to call deliver_now instead of deliver. The test double only stubbed deliver, causing a failure. This is a test-only change — real ActionMailer objects respond to both methods.
1 parent d21941c commit 7aaf780

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spec/models/user_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
let(:user) { create(:user) }
1313

1414
it "generates the reset password token" do
15-
expect(Spree::UserMailer).to receive(:reset_password_instructions).with(user, anything, {}).and_return(double(deliver: true))
15+
expect(Spree::UserMailer).to receive(:reset_password_instructions).with(user, anything, {}).and_return(double(deliver_now: true))
1616
expect { user.send_reset_password_instructions }.to change(user, :reset_password_token).to be_present
1717
end
1818

0 commit comments

Comments
 (0)