Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Commit

Permalink
Missed a refactored callback in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ozten committed May 30, 2013
1 parent aed6790 commit 28abf7c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions server/tests/pin-code-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ suite.addBatch({
'Is good for matches': function(err, isValid) {
assert.isNull(err);
assert.ok(isValid);
assert.ok(new Date() - goodTime > 2000); // Should take more 2 seconds
var end = new Date();
assert.ok(end - goodTime >= 2000,
'Was hoping for more than 2000 millis, but got ' + (end - goodTime));
}
},
'Not Valid': {
topic: function(err, email, pin) {
topic: function(err, pin) {
var req = {
body: { pin: '123456' },
pincodedb: { expected_pin: pin }
Expand All @@ -59,7 +61,9 @@ suite.addBatch({
'Will not match': function(err, isValid) {
assert.isNull(err);
assert.equal(false, isValid);
assert.ok(new Date() - badTime > 2000); // Should take more 2 seconds
var end = new Date();
assert.ok(end - badTime >= 2000,
'Was hoping for more than 2000 millis, but got ' + (end - badTime));
}
}
},
Expand Down

0 comments on commit 28abf7c

Please sign in to comment.