spec/griddler/sendgrid/adapter_spec.rb in griddler-sendgrid-1.1.0 vs spec/griddler/sendgrid/adapter_spec.rb in griddler-sendgrid-1.2.0
- old
+ new
@@ -143,9 +143,15 @@
params = default_params.merge(charsets: 'This is not JSON')
normalize_params(params)[:charsets].should eq({})
end
+ it 'does not explode if address is not parseable' do
+ params = default_params.merge(cc: '"Closing Bracket Missing For Some Reason" <hi@example.com')
+
+ normalize_params(params)[:cc].should eq([])
+ end
+
it 'defaults charsets to an empty hash if it is not specified in params' do
params = default_params.except(:charsets)
normalize_params(params)[:charsets].should eq({})
end