Commit ee1de011 authored by Robert Speicher's avatar Robert Speicher

Premailer shouldn't remove script tags from our emails

Closes #14943.
parent a1c794c5
...@@ -3,5 +3,6 @@ Premailer::Rails.config.merge!( ...@@ -3,5 +3,6 @@ Premailer::Rails.config.merge!(
generate_text_part: false, generate_text_part: false,
preserve_styles: true, preserve_styles: true,
remove_comments: true, remove_comments: true,
remove_ids: true remove_ids: true,
remove_scripts: false
) )
...@@ -141,10 +141,12 @@ shared_examples 'a new user email' do ...@@ -141,10 +141,12 @@ shared_examples 'a new user email' do
end end
shared_examples 'it should have Gmail Actions links' do 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/ } it { is_expected.to have_body_text /ViewAction/ }
end end
shared_examples 'it should not have Gmail Actions links' do 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/ } it { is_expected.to_not have_body_text /ViewAction/ }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment