diff --git a/app/views/notify/in_product_marketing_email.html.haml b/app/views/notify/in_product_marketing_email.html.haml index 45b002757e321256d6ba1b035270bf5ec3b60613..6382718480f0154d42ea5cfa85b5d36737a2008f 100644 --- a/app/views/notify/in_product_marketing_email.html.haml +++ b/app/views/notify/in_product_marketing_email.html.haml @@ -3,7 +3,7 @@ %head %meta{ content: "text/html; charset=utf-8", "http-equiv" => "Content-Type" } %meta{ content: "width=device-width, initial-scale=1", name: "viewport" } - %link{ href: "https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600", rel: "stylesheet", type: "text/css" } + %link{ href: "https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600", rel: "stylesheet", type: "text/css", data: { premailer: 'ignore' } } %title= message.subject :css /* CLIENT-SPECIFIC STYLES */ diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 8ee887761071231411e61b2aae2d5282211313f3..3b1694527d3bd4701d890a088c69fc9ffff3067d 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -1969,6 +1969,19 @@ def invite_to_group(group, inviter:, user: nil) end end + describe 'in product marketing', :mailer do + let_it_be(:group) { create(:group) } + + let(:mail) { ActionMailer::Base.deliveries.last } + + it 'does not raise error' do + described_class.in_product_marketing_email(user.id, group.id, :trial, 0).deliver + + expect(mail.subject).to eq('Go farther with GitLab') + expect(mail.body.parts.first.to_s).to include('Start a GitLab Ultimate trial today in less than one minute, no credit card required.') + end + end + def expect_sender(user) sender = subject.header[:from].addrs[0] expect(sender.display_name).to eq("#{user.name} (@#{user.username})")