Skip to content

Commit

Permalink
added test for unicode header field
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Feb 9, 2014
1 parent 31ef49d commit 3133a82
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/mailbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,14 @@ test("Bcc missing from output, included in envelope", function(){
ok(/^To: receiver@example.com$/m.test(msg));
ok(!/^Bcc:/m.test(msg));
});

test("Unicode subject", function(){
"use strict";

var msg = mailbuild("text/plain").
setHeader({
subject: "jõgeval istus kägu metsas"
}).build();

ok(/^Subject: =\?UTF-8\?Q\?j=C3=B5geval\?= istus =\?UTF-8\?Q\?k=C3=A4gu\?= metsas$/m.test(msg));
});

0 comments on commit 3133a82

Please sign in to comment.