diff options
author | Kyle Partridge <partkyle@gmail.com> | 2012-01-10 17:27:53 -0800 |
---|---|---|
committer | Kyle Partridge <partkyle@gmail.com> | 2012-01-10 17:28:18 -0800 |
commit | 5ec77b9b211b8ebda61b2e83f5cab0d8f79a458b (patch) | |
tree | e988d94796621cf5162c44cfeb24f7627dc2948c | |
parent | c2251086ea8a24465dd801d12aa563d87a1a3a90 (diff) | |
download | sendgrid-nodejs-5ec77b9b211b8ebda61b2e83f5cab0d8f79a458b.zip sendgrid-nodejs-5ec77b9b211b8ebda61b2e83f5cab0d8f79a458b.tar.gz sendgrid-nodejs-5ec77b9b211b8ebda61b2e83f5cab0d8f79a458b.tar.bz2 |
added a test for unicode emails
-rw-r--r-- | test/lib/sendgrid.test.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lib/sendgrid.test.js b/test/lib/sendgrid.test.js index 23660ae..18df2b6 100644 --- a/test/lib/sendgrid.test.js +++ b/test/lib/sendgrid.test.js @@ -28,6 +28,13 @@ var smtp_params = { text: 'This is an email.' }; +var unicode_params = { + to: 'kyle.partridge@sendgrid.com', + from: 'kyle.partridge@sendgrid.com', + subject: 'Unicode Email!', + text: 'I can haz unicode? ✔' +}; + describe('SendGrid', function () { var sendgrid; beforeEach(function() { @@ -68,6 +75,14 @@ describe('SendGrid', function () { }); }); + it('should allow unicode in emails', function(done) { + var mail = new Email(unicode_params); + sendgrid.smtp(mail, function(success, message) { + if (!success) should.fail(message); + done(); + }); + }); + it('should report errors back to the user', function(done) { var mail = new Email({}); sendgrid.smtp(mail, function(success, message) { |