Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed branch tests

  • Loading branch information...
commit e56d56266b8cf5efa23922399430331fb0380b73 1 parent 8f8b5e7
Nathan authored

Showing 1 changed file with 5 additions and 6 deletions. Show diff stats Hide diff stats

  1. 11  test/middleware-branch.test.js
11  test/middleware-branch.test.js
... ...
@@ -1,5 +1,5 @@
1 1
 var bogart      = require('../lib/bogart')
2  
-  , q           = require("promised-io/lib/promise")
  2
+  , q           = require('q')
3 3
   , security    = require("../lib/security")
4 4
   , util        = require('util')
5 5
   , test        = require('tap').test
@@ -13,9 +13,8 @@ test('rejects with error "Empty chain" when called with an empty chain', functio
13 13
 
14 14
   q.when(branch(mockRequest('/')), null, function(err) {
15 15
     t.equal(err.message, 'Empty chain');
16  
-  });
17  
-
18  
-  t.plan(2);
  16
+    t.end();
  17
+  }).end();
19 18
 });
20 19
 
21 20
 test('should have ifTrue', function(t) {
@@ -42,7 +41,7 @@ test('should follow ifTrue path', function(t) {
42 41
   });
43 42
 
44 43
   binary.ifTrue(function(req) {
45  
-    t.ok(req);
  44
+    t.ok(req, 'Followed ifTrue path');
46 45
   });
47 46
 
48 47
   binary(mockRequest('/'));
@@ -56,7 +55,7 @@ test('should follow ifFalse path', function(t) {
56 55
   });
57 56
 
58 57
   binary.ifFalse(function(req) {
59  
-    t.ok(req);
  58
+    t.ok(req, 'Followed ifFalse path');
60 59
   });
61 60
 
62 61
   binary(mockRequest('/'));

0 notes on commit e56d562

Please sign in to comment.
Something went wrong with that request. Please try again.