Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed branch tests

  • Loading branch information...
commit e56d56266b8cf5efa23922399430331fb0380b73 1 parent 8f8b5e7
@nrstott authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 test/middleware-branch.test.js
View
11 test/middleware-branch.test.js
@@ -1,5 +1,5 @@
var bogart = require('../lib/bogart')
- , q = require("promised-io/lib/promise")
+ , q = require('q')
, security = require("../lib/security")
, util = require('util')
, test = require('tap').test
@@ -13,9 +13,8 @@ test('rejects with error "Empty chain" when called with an empty chain', functio
q.when(branch(mockRequest('/')), null, function(err) {
t.equal(err.message, 'Empty chain');
- });
-
- t.plan(2);
+ t.end();
+ }).end();
});
test('should have ifTrue', function(t) {
@@ -42,7 +41,7 @@ test('should follow ifTrue path', function(t) {
});
binary.ifTrue(function(req) {
- t.ok(req);
+ t.ok(req, 'Followed ifTrue path');
});
binary(mockRequest('/'));
@@ -56,7 +55,7 @@ test('should follow ifFalse path', function(t) {
});
binary.ifFalse(function(req) {
- t.ok(req);
+ t.ok(req, 'Followed ifFalse path');
});
binary(mockRequest('/'));
Please sign in to comment.
Something went wrong with that request. Please try again.