Skip to content

Commit

Permalink
setup for test
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Tahler committed Jan 6, 2013
1 parent 9b8074f commit 0ec52e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion actions/randomNumber.js
Expand Up @@ -32,4 +32,4 @@ action.run = function(api, connection, next){

/////////////////////////////////////////////////////////////////////
// exports
exports.action = action;
exports.action = action;
13 changes: 9 additions & 4 deletions test/action_status.js
Expand Up @@ -13,10 +13,15 @@ describe('Action: status', function(){
it('stats should be returned and make sense', function(done){
specHelper.apiTest.get('/status', 0, {}, function(response){
response.statusCode.should.equal(200);
response.body.stats.webServer.numberOfGlobalWebRequests.should.be.above(0);
response.body.stats.socketServer.numberOfGlobalSocketRequests.should.be.above(-1);
response.body.stats.uptimeSeconds.should.be.above(0);
response.body.stats.id.length.should.be.above(0);

response.body.uptime.should.be.above(0);
response.body.id.length.should.be.above(0);

response.body.stats.global['webServer:numberOfWebRequests'].should.be.above(0);
response.body.stats.local['webServer:numberOfWebRequests'].should.be.above(0);
response.body.stats.local['actions:processedActions'].should.be.above(0);
response.body.stats.local['redis:numberOfPeers'].should.be.above(0);

done();
});
});
Expand Down

0 comments on commit 0ec52e2

Please sign in to comment.