diff --git a/spec/support/shared_examples/email_header_examples.rb b/spec/support/shared_examples/email_header_examples.rb index c23d6403a3..0b68a6b127 100644 --- a/spec/support/shared_examples/email_header_examples.rb +++ b/spec/support/shared_examples/email_header_examples.rb @@ -9,7 +9,7 @@ end RSpec.shared_examples 'non-customer facing email with active white labelling' do |mail| context 'when hide OFN navigation is enabled for the distributor of the order' do before do - allow(order.distributor).to receive(:hide_ofn_navigation).and_return(true) + order.distributor.hide_ofn_navigation = true end it 'still displays the OFN header with logo' do @@ -21,7 +21,7 @@ end RSpec.shared_examples 'customer facing email with active white labelling' do |mail| context 'when hide OFN navigation is enabled for the distributor of the order' do before do - allow(order.distributor).to receive(:hide_ofn_navigation).and_return(true) + order.distributor.hide_ofn_navigation = true end it 'does not display the OFN header and logo' do