Skip to content

Commit

Permalink
Added test for passing an array to log()
Browse files Browse the repository at this point in the history
  • Loading branch information
freeall committed Dec 4, 2013
1 parent 04aae77 commit 2a16d44
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/log-test.js
Expand Up @@ -139,4 +139,25 @@ vows.describe('node-loggly/inputs (no auth)').addBatch({
}
}
}
}).addBatch({
"When using the node-loggly client without authentication": {
"the log() method": {
"takes an array": {
"when not passed a callback": {
topic: function () {
logglyJSON.log([
{ work: 'it harder' },
{ make: 'it better' }
]);
logglyJSON.on('log', this.callback.bind(null, null));
},
"should log messages to loggly": function (err, result) {
assert.isNull(err);
assert.isObject(result);
assert.equal(result.response, 'ok');
}
}
}
}
}
}).export(module);

0 comments on commit 2a16d44

Please sign in to comment.