From 66250fb46e0bba58bcdc243e4b0dc6a69b2cbe18 Mon Sep 17 00:00:00 2001 From: Robert Nowakowski Date: Wed, 25 Nov 2020 13:57:26 +0100 Subject: [PATCH] Adds and changes tests --- spec/features/confirmation_spec.rb | 2 +- spec/models/user_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/features/confirmation_spec.rb b/spec/features/confirmation_spec.rb index ce9e95d16..41dbd202a 100644 --- a/spec/features/confirmation_spec.rb +++ b/spec/features/confirmation_spec.rb @@ -3,7 +3,7 @@ RSpec.feature 'Confirmation', type: :feature, reload_user: true do before do set_confirmable_option(true) - Spree::UserMailer.stub(:confirmation_instructions).and_return(double(deliver: true)) + expect(Spree::UserMailer).to receive(:confirmation_instructions).with(anything, anything, { current_store_id: Spree::Store.current.id }).and_return(double(deliver: true)) end after(:each) { set_confirmable_option(false) } diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 0ef22b2f2..e16727b10 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -68,7 +68,7 @@ describe "confirmable", reload_user: true do it "is confirmable if the confirmable option is enabled" do set_confirmable_option(true) - Spree::UserMailer.stub(:confirmation_instructions).and_return(double(deliver: true)) + Spree::UserMailer.stub(:confirmation_instructions).with(anything, anything, { current_store_id: Spree::Store.current.id }).and_return(double(deliver: true)) expect(Spree.user_class.devise_modules).to include(:confirmable) set_confirmable_option(false) end