Skip to content

Commit

Permalink
Add test in client secure channel to make sure error is raised if per…
Browse files Browse the repository at this point in the history
…formMessageTransaction is called before connection
  • Loading branch information
erossignon committed Feb 13, 2014
1 parent 0344696 commit 7fb95e1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/client/test_client_secure_channel_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,18 @@ describe("testing ClientSecureChannelLayer ",function(){
});
});

it("should callback with an error if performMessageTransaction is called before connection",function(done){

var secureChannel = new ClientSecureChannelLayer();
var s = require("../../lib/structures");
var message = new s.GetEndpointsRequest();
secureChannel.performMessageTransaction(message, s.GetEndpointsResponse,function(err){
err.message.should.equal("Client not connected");
done();
});
});




});

0 comments on commit 7fb95e1

Please sign in to comment.