From 2823965e1be7f2ae8c6ee1cfd1b13901c05ea201 Mon Sep 17 00:00:00 2001 From: digvijay-plivo Date: Fri, 13 Sep 2019 19:03:08 +0530 Subject: [PATCH] Fix test cases with new changes --- test/messages.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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') })