Premailer shouldn't remove script tags from our emails

Closes #14943.
This commit is contained in:
Robert Speicher 2016-04-05 17:03:34 -04:00
parent a1c794c591
commit ee1de011d1
2 changed files with 4 additions and 1 deletions

View File

@ -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
)

View File

@ -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