Skip to content

Commit

Permalink
check expired tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Feb 3, 2012
1 parent d776707 commit 95e1871
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ test('reset success', function (t) {
t.equal(b, 'password reset');
reset(function (e, b) {
if (e) t.fail(e);
t.equal(b, 'reset token not set');
t.equal(b, 'reset token not set', 'expiry check');
t.end();
});
});
Expand All @@ -112,6 +112,16 @@ test('reset success', function (t) {
}
});

test('invalid token', function (t) {
var opts = {
uri : 'http://localhost:' + ports.http + '/password_reset?beepboop==',
}
request(opts, function (e, r, b) {
t.equal(b, 'auth token expired');
t.end();
});
});

tap.on('end', function () {
app.close();
server.close();
Expand Down

0 comments on commit 95e1871

Please sign in to comment.