From 604a47bd96248ba488b759a65edd897327fc5d20 Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Tue, 10 Dec 2024 05:49:35 +0500 Subject: [PATCH] 13007: add specs for text mail --- spec/mailers/producer_mailer_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/mailers/producer_mailer_spec.rb b/spec/mailers/producer_mailer_spec.rb index f640186453..20702419e8 100644 --- a/spec/mailers/producer_mailer_spec.rb +++ b/spec/mailers/producer_mailer_spec.rb @@ -192,6 +192,7 @@ RSpec.describe ProducerMailer, type: :mailer do context "when no customer has customer code" do it 'should not displays business name column' do expect(table_header).not_to have_selector("th", text: 'Business Name') + expect(customer_details_summary_text(mail)).not_to include('Test Business Name') end end @@ -203,6 +204,7 @@ RSpec.describe ProducerMailer, type: :mailer do expect( body_as_html(mail).find("table.order-summary.customer-order tbody tr") ).to have_selector("td", text: 'Test Business Name') + expect(customer_details_summary_text(mail)).to include('Test Business Name') end end end