more tests for log and Node

This commit is contained in:
dceejay
2015-03-08 16:53:48 +00:00
parent 10277aa956
commit 9c46feb22b
2 changed files with 23 additions and 0 deletions

View File

@@ -483,6 +483,18 @@ describe('Node', function() {
Log.log.restore();
done();
});
it('returns not defined if eventname defined', function(done) {
var n = new RedNode({id:'123',type:'abc'});
var loginfo = {};
sinon.stub(Log, 'log', function(msg) {
loginfo = msg;
});
var msg = {payload:"foo", _msgid:"987654321"};
var m = n.metric("info",msg,"15mb");
should(m).be.undefined;
Log.log.restore();
done();
});
});
describe('#status', function() {