Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

VEN-20 Transactional emails are not being send out (#11569)

Aleksandar Petrushev610325c8ad94
diff --git a/emails/app/helpers/spree/mail_helper.rb b/emails/app/helpers/spree/mail_helper.rb
index 36385148d8..641f9d1d9a 100644
--- a/emails/app/helpers/spree/mail_helper.rb
+++ b/emails/app/helpers/spree/mail_helper.rb
@@ -4,7 +4,7 @@ module Spree
def variant_image_url(variant)
image = default_image_for_product_or_variant(variant)
- image ? main_app.cdn_image_url(image.url(:small)) : 'noimage/small.png'
+ image ? main_app.cdn_image_url(image.url(:small)) : image_url('noimage/small.png')
end
def name_for(order)
@@ -21,7 +21,7 @@ module Spree
Please upload a Store logo instead
DEPRECATION
- 'logo/spree_50.png'
+ image_url('logo/spree_50.png')
end
def logo_path
diff --git a/emails/spec/helpers/spree/mail_helper_spec.rb b/emails/spec/helpers/spree/mail_helper_spec.rb
index b47bfb4dd5..82ff42eb65 100644
--- a/emails/spec/helpers/spree/mail_helper_spec.rb
+++ b/emails/spec/helpers/spree/mail_helper_spec.rb
@@ -2,6 +2,7 @@ require 'spec_helper'
module Spree
describe MailHelper, type: :helper do
+
describe '#variant_image_url' do
subject { helper.variant_image_url(variant) }
@@ -11,7 +12,7 @@ module Spree
let(:images) { [] }
specify 'returns placeholder path' do
- expect(subject).to eq 'noimage/small.png'
+ expect(subject).to match Regexp.new('assets/noimage/small-[0-9a-z]*\.png')
end
end