Skip to content

Commit

Permalink
changed expected eventlistner call frome on to once
Browse files Browse the repository at this point in the history
  • Loading branch information
slomo committed Nov 25, 2011
1 parent 7b22bd2 commit 03e6c85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test-xappy.js
Expand Up @@ -328,7 +328,7 @@ module.exports = {
'request cancelation' : function(test){

xrs = {
'req' : { on: sinon.spy() },
'req' : { once: sinon.spy() },
'emitter' : {
cancle : sinon.spy(),
on: function(){},
Expand All @@ -339,10 +339,10 @@ module.exports = {
test.finish();
});

test.ok(xrs.req.on.calledWith('close'));
test.ok(xrs.req.once.calledWith('close'));

// simulate closed connection
xrs.req.on.getCall(0).args[1]();
xrs.req.once.getCall(0).args[1]();
test.ok(xrs.emiter.cancle.called);
},
};
Expand Down

0 comments on commit 03e6c85

Please sign in to comment.