Skip to content

Commit

Permalink
add test for verify email dwyl/auth#62
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed May 2, 2020
1 parent 322f5bb commit 9902013
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/verify.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p>Hi!</p>

<p>Thank you for signing up with your
email address: <strong>{{email}}</strong>!</p>
email address: <strong>{{email}}</strong></p>

<p>Please click the link to verify your address:
<a href="{{link}}">{{link}}</a>
Expand Down
19 changes: 19 additions & 0 deletions test/send.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,22 @@ test('simulate bounce and complaint', function (t) {
t.end();
})
});

test('simulate verification email', function (t) {
const event = {
"email": [
"[email protected]",
// "[email protected]"
],
"template": "verify",
"name": "Testy McTestface",
"id": 1,
"key": "simulate_verify",
"link": "https://dwyl.com/person/verify/StTqXEQ2l-Y"
}; // no template
send(event, function(err, data) {
console.log(data);
t.equal(data.MessageId.length, 60, "Sent! message_id: " + data.MessageId);
t.end();
})
});

0 comments on commit 9902013

Please sign in to comment.