Fix test cases with new changes

This commit is contained in:
digvijay-plivo 2019-09-13 19:03:08 +05:30
parent 644d4d3db6
commit 2823965e1b

View file

@ -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')
})