mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-04 02:31:33 +00:00
Update test mailer specs to check that this super admin facing email remains unaffected by white labelling (there are no user or customer facing emails here)
Also make use of the newly separated shared_examples
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Spree::TestMailer do
|
||||
subject(:mail) { described_class.test_email(order) }
|
||||
let(:user) { create(:user) }
|
||||
let(:order) { build(:order_with_distributor) }
|
||||
|
||||
context ":from not set explicitly" do
|
||||
it "falls back to spree config" do
|
||||
@@ -18,4 +20,9 @@ RSpec.describe Spree::TestMailer do
|
||||
Spree::TestMailer.test_email(user.id).deliver_now
|
||||
}.not_to raise_error
|
||||
end
|
||||
|
||||
context "white labelling" do
|
||||
it_behaves_like 'email with inactive white labelling', :mail
|
||||
it_behaves_like 'non-customer facing email with active white labelling', :mail
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user