spec/lib/sendgrid_actionmailer_spec.rb in sendgrid-actionmailer-2.2.0 vs spec/lib/sendgrid_actionmailer_spec.rb in sendgrid-actionmailer-2.2.1
- old
+ new
@@ -391,9 +391,21 @@
mail['dynamic_template_data'] = template_data
mailer.deliver!(mail)
expect(client.sent_mail['personalizations'].first['dynamic_template_data']).to eq(template_data)
end
end
+
+ it 'sets dynamic template data and sandbox_mode' do
+ mail['mail_settings'] = '{}'
+ mailer.deliver!(mail)
+ expect(client.sent_mail['mail_settings']).to eq(nil)
+ end
+
+ it 'sets dynamic template data and sandbox_mode' do
+ mail['mail_settings'] = {}
+ mailer.deliver!(mail)
+ expect(client.sent_mail['mail_settings']).to eq(nil)
+ end
end
context 'multipart/alternative' do
before do
mail.content_type 'multipart/alternative'