You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mail.setSubject("Hello World from the SendGrid Node.js Library")
17
-
18
-
content=newhelper.Content("text/plain","some text here")
19
-
mail.addContent(content)
20
-
content=newhelper.Content("text/html","<html><body>some text here</body></html>")
21
-
mail.addContent(content)
22
-
23
-
test_payload='{"from":{"email":"[email protected]"},"personalizations":[{"to":[{"email":"[email protected]"}]}],"subject":"Hello World from the SendGrid Node.js Library","content":[{"type":"text/plain","value":"some text here"},{"type":"text/html","value":"<html><body>some text here</body></html>"}]}'
12
+
test_payload='{"from":{"email":"[email protected]"},"personalizations":[{"to":[{"email":"[email protected]"}]}],"subject":"Sending with SendGrid is Fun","content":[{"type":"text/plain","value":"and easy to do anywhere, even with Node.js"}]}'
24
13
25
14
it('builds the correct payload',function(){
26
15
assert.equal(JSON.stringify(mail.toJSON()),test_payload,'payload is correct')
0 commit comments