diff --git a/test/messages.js b/test/messages.js index 121f38d..6d90d67 100644 --- a/test/messages.js +++ b/test/messages.js @@ -28,7 +28,7 @@ describe('message', function () { }); it('should send message via interface', function () { - return client.messages.send('src', 'dst', 'text') + return client.messages.send('src', 'dst', 'text',{}, null) .then(function(message){ assert.equal(message.message, 'message(s) queued') }) @@ -43,14 +43,14 @@ describe('message', function () { }); it('should throw error - src and powerpack both not present', function () { - return client.messages.send(null, 'dst', 'text', {}, null) + return client.messages.send({src:null,dst:'dst',text:'text',powerpackUUID:null}) .catch(function(err){ assert.equal(err.message, 'Neither of src or powerpack uuid present, either one is required') }) }); it('should throw error - src and powerpack both are present', function () { - return client.messages.send('91235456917375', 'dst', 'text', {}, '916386027476') + return client.messages.send({src:'91235456917375', dst:'dst', text:'text', powerpackUUID:'916386027476'}) .catch(function(err){ assert.equal(err.message, 'Either of src or powerpack uuid, both of them are present') })