mirror of
https://github.com/donl/plivo-node.git
synced 2026-06-30 06:12:08 -06:00
Fix test cases with new changes
This commit is contained in:
parent
644d4d3db6
commit
2823965e1b
1 changed files with 3 additions and 3 deletions
|
|
@ -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')
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue