From 1e88523e793a5fe13fd84258c889a17649be60b9 Mon Sep 17 00:00:00 2001 From: Ramey Girdhar Date: Mon, 13 Aug 2018 10:29:14 +0530 Subject: [PATCH] adding/removing unit tests for powerpack change --- test/messages.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/test/messages.js b/test/messages.js index b24f4ea..121f38d 100644 --- a/test/messages.js +++ b/test/messages.js @@ -42,10 +42,17 @@ describe('message', function () { }) }); - it('should throw error - src is required via interface', function () { - return client.messages.send(null, 'dst', 'text') + it('should throw error - src and powerpack both not present', function () { + return client.messages.send(null, 'dst', 'text', {}, null) .catch(function(err){ - assert.equal(err.message, 'Missing mandatory field: src') + 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') + .catch(function(err){ + assert.equal(err.message, 'Either of src or powerpack uuid, both of them are present') }) });