From 0079ed219b5fe802f44fe2b5a1d8fb393b1d6a62 Mon Sep 17 00:00:00 2001 From: Konrad Date: Tue, 24 Jun 2025 18:12:32 +0200 Subject: [PATCH] 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 --- spec/mailers/producer_mailer_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/mailers/producer_mailer_spec.rb b/spec/mailers/producer_mailer_spec.rb index b909a31933..27711d711b 100644 --- a/spec/mailers/producer_mailer_spec.rb +++ b/spec/mailers/producer_mailer_spec.rb @@ -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