Skip to content

Commit

Permalink
added test for primitive metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Schoonover authored and indexzero committed Oct 7, 2011
1 parent 2957749 commit f59ef2d
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,23 @@ helpers.testLevels = function (levels, transport, assertMsg, assertFn) {
tests['with the ' + level + ' level'] = test;
});

var test = {
var metadatatest = {
topic: function () {
transport.log('info', 'test message', { metadata: true }, this.callback.bind(this, null));
}
};

test[assertMsg] = assertFn;
tests['when passed metadata'] = test;
metadatatest[assertMsg] = assertFn;
tests['when passed metadata'] = metadatatest;

var primmetadatatest = {
topic: function() {
transport.log('info', 'test message', 'metadata', this.callback.bind(this, null));
}
};

primmetadatatest[assertMsg] = assertFn;
tests['when passed primitive metadata'] = primmetadatatest;

return tests;
};
};

0 comments on commit f59ef2d

Please sign in to comment.