summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-04-05 21:47:08 +0000
committerRobert Speicher <robert@gitlab.com>2016-04-05 21:47:08 +0000
commit74313988aca5de1e65940d311f0f87e9da1b93c2 (patch)
tree97885d425a588679e5f946a5392ad90836217b09
parentb393e513fe4d3f50a6ac296eaef4cef40e6d4c04 (diff)
parentee1de011d1a9e2990fd56a794bbff6b0ec374d00 (diff)
downloadgitlab-ce-74313988aca5de1e65940d311f0f87e9da1b93c2.tar.gz
Merge branch 'rs-fix-gmail-actions' into 'master'
Premailer shouldn't remove script tags from our emails Closes #14943. See merge request !3552
-rw-r--r--config/initializers/premailer.rb3
-rw-r--r--spec/mailers/shared/notify.rb2
2 files changed, 4 insertions, 1 deletions
diff --git a/config/initializers/premailer.rb b/config/initializers/premailer.rb
index a44316bc3a4..b9176688bc4 100644
--- a/config/initializers/premailer.rb
+++ b/config/initializers/premailer.rb
@@ -3,5 +3,6 @@ Premailer::Rails.config.merge!(
generate_text_part: false,
preserve_styles: true,
remove_comments: true,
- remove_ids: true
+ remove_ids: true,
+ remove_scripts: false
)
diff --git a/spec/mailers/shared/notify.rb b/spec/mailers/shared/notify.rb
index 56a6dbf96f9..5a85cb501dd 100644
--- a/spec/mailers/shared/notify.rb
+++ b/spec/mailers/shared/notify.rb
@@ -141,10 +141,12 @@ shared_examples 'a new user email' do
end
shared_examples 'it should have Gmail Actions links' do
+ it { is_expected.to have_body_text '<script type="application/ld+json">' }
it { is_expected.to have_body_text /ViewAction/ }
end
shared_examples 'it should not have Gmail Actions links' do
+ it { is_expected.to_not have_body_text '<script type="application/ld+json">' }
it { is_expected.to_not have_body_text /ViewAction/ }
end