Display footer_email in confirmation emails correctly

A bug introduced in a9c37c162e caused the
creation of confirmation emails for shops to fail. The email template
got fixed now and the email address from the database is displayed if
present.
This commit is contained in:
Maikel Linke
2016-02-26 16:09:14 +11:00
parent 6193bb896b
commit 1770cbb6bf
2 changed files with 8 additions and 2 deletions

View File

@@ -24,6 +24,5 @@
%h5
= t :email_contact
%strong
%a{href: ContentConfig.footer_email.reverse, mailto: true, target: '_blank'}
#{ContentConfig.footer_email}
= mail_to ContentConfig.footer_email
%span.clear

View File

@@ -40,5 +40,12 @@ describe Spree::OrderMailer do
ActionMailer::Base.deliveries.count.should == 1
ActionMailer::Base.deliveries.first.to.should == [@distributor.email]
end
it "sends an email even if a footer_email is given" do
# Testing bug introduced by a9c37c162e1956028704fbdf74ce1c56c5b3ce7d
ContentConfig.footer_email = "email@example.com"
Spree::OrderMailer.confirm_email_for_shop(@order1.id).deliver
ActionMailer::Base.deliveries.count.should == 1
end
end
end