Permalink
Browse files

Added test for passing an array to log()

  • Loading branch information...
1 parent 04aae77 commit 2a16d44b122ebcac707e1d7cccddec79a8b9a4e6 @freeall freeall committed Dec 4, 2013
Showing with 21 additions and 0 deletions.
  1. +21 −0 test/log-test.js
View
@@ -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.