From 97fdeb44ad8ed4132a22e574201349b3500d84ed Mon Sep 17 00:00:00 2001 From: kowshik-plivo Date: Fri, 12 Aug 2022 10:49:14 +0530 Subject: [PATCH] Changes in token creation --- test/token.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/token.js b/test/token.js index 18e21d6..86921ac 100644 --- a/test/token.js +++ b/test/token.js @@ -8,11 +8,16 @@ let client = new Client('sampleid', 'sammpletoken', 'sampleproxy'); describe('Token', function () { it('should create token via interface', function () { - return client.token.create("sampleid").then(function (response) { + return client.token.create("sampleid").then(function (token) { assert.equal(response.apiid, '5cbad7b4-19f4-11ed-8b03-0242ac110005'); - assert.equal(response.token, 'eyJhbGciOiJIUzI1NiIsImN0eSI6InBsaXZvO3Y9MSIsInR5cCI6IkpXVCJ9.eyJhcHAiOiIiLCJleHAiOjE2NjAzNjM2ODMsImlzcyI6Ik1BTURWTFpKWTJaR1k1TVdVMVpKIiwibmJmIjoxNjYwMjc3MjgzLCJwZXIiOnsidm9pY2UiOnsiaW5jb21pbmdfYWxsb3ciOmZhbHNlLCJvdXRnb2luZ19hbGxvdyI6dHJ1ZX19LCJzdWIiOiIifQ.LAwFEuotTmbZeGWBhfNT4X2KbRapYF23BrkwVfmr5A4'); }) }); + // it('should create endpoint via interface', function () { + // return client.endpoints.create('username', 'password', 'alias') + // .then(function(endpoint){ + // assert.equal(endpoint.message, 'created') + // }) + // }); }); // {'api_id': '5cbad7b4-19f4-11ed-8b03-0242ac110005',