From d5a7e907a3353d959c8dccd8177d08fe997b8f70 Mon Sep 17 00:00:00 2001 From: Steve Pettitt Date: Tue, 10 May 2016 23:11:14 +0100 Subject: [PATCH] Fix specs, need to add new for HTML --- .../producer_mailer/order_cycle_report.html.haml | 14 +++++++------- spec/mailers/producer_mailer_spec.rb | 7 +++---- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/views/producer_mailer/order_cycle_report.html.haml b/app/views/producer_mailer/order_cycle_report.html.haml index 66276745b5..31cef99465 100644 --- a/app/views/producer_mailer/order_cycle_report.html.haml +++ b/app/views/producer_mailer/order_cycle_report.html.haml @@ -53,10 +53,10 @@ #{@tax_total} %p = t :producer_mail_text_after - %em - %p - #{@coordinator.name} - %p - #{@coordinator.address.address1}, #{@coordinator.address.city}, #{@coordinator.address.zipcode} - #{@coordinator.phone} - #{@coordinator.email} + %em + %p + #{@coordinator.name} + %p + #{@coordinator.address.address1}, #{@coordinator.address.city}, #{@coordinator.address.zipcode} + #{@coordinator.phone} + #{@coordinator.email} diff --git a/spec/mailers/producer_mailer_spec.rb b/spec/mailers/producer_mailer_spec.rb index e1c91af699..2ced290fed 100644 --- a/spec/mailers/producer_mailer_spec.rb +++ b/spec/mailers/producer_mailer_spec.rb @@ -44,7 +44,7 @@ describe ProducerMailer do end it "includes receival instructions" do - mail.body.should include 'Outside shed.' + mail.body.encoded.should include 'Outside shed.' end it "cc's the enterprise" do @@ -59,12 +59,11 @@ describe ProducerMailer do end it "does not include incomplete orders" do - mail.body.should_not include p3.name + mail.body.encoded.should_not include p3.name end it "includes the total" do - puts mail.body.encoded - mail.body.should include 'Total: $20.00' + mail.body.encoded.should include 'Total: $20.00' end it "sends no mail when the producer has no orders" do