Skip to content

Commit

Permalink
Add id type test
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoRBaquero authored Oct 31, 2017
1 parent a43a07d commit a4f1f11
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/producer.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,20 @@ describe('Producer', function () {
});
});

it('returns an error when object messages have invalid id param', function (done) {
var errMessage = 'Message.id value must be a string';

var message1 = {
id: 1234,
body: 'body1'
};

producer.send(message1, function (err) {
assert.equal(err.message, errMessage);
done();
});
});

it('returns an error when object messages have invalid groupId param', function (done) {
var errMessage = 'Message.groupId value must be a string';

Expand Down

0 comments on commit a4f1f11

Please sign in to comment.