13007: add specs for text mail

This commit is contained in:
Ahmed Ejaz
2024-12-10 05:49:35 +05:00
parent 241a6d8128
commit 604a47bd96

View File

@@ -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