Update producer mailer specs to check that this producer facing email remains unaffected by white labelling (there are no customer facing emails here)

Also make use of the newly separated shared_examples
This commit is contained in:
Konrad
2025-06-24 18:12:32 +02:00
parent 5957d99812
commit 0079ed219b

View File

@@ -66,6 +66,11 @@ RSpec.describe ProducerMailer do
expect(mail.reply_to).to eq [order_cycle.coordinator.contact.email]
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
it "includes the pickup time for each distributor" do
expect(mail.body.encoded).to include "#{d1.name} (Tue, 23rd Dec)"
end