mirror of
https://github.com/donl/plivo-node.git
synced 2026-05-25 22:07:10 -06:00
temp change
This commit is contained in:
parent
494b4c9097
commit
a6782fb8d5
2 changed files with 18 additions and 19 deletions
21
test/jwt.js
21
test/jwt.js
|
|
@ -1,12 +1,11 @@
|
|||
import assert from 'assert';
|
||||
import sinon from 'sinon';
|
||||
// import {AccessToken} from '../lib/utils/jwt';
|
||||
// import assert from 'assert';
|
||||
// import sinon from 'sinon';
|
||||
|
||||
import {AccessToken} from '../lib/utils/jwt';
|
||||
|
||||
describe('Jwt', function () {
|
||||
it('should be created', function () {
|
||||
let acctkn = new AccessToken('MADADADADADADADADADA', 'qwerty', 'username', {validFrom: 12121212, lifetime: 300}, 'username-12345');
|
||||
acctkn.addVoiceGrants(true, true);
|
||||
assert.equal(acctkn.toJwt(), 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImN0eSI6InBsaXZvO3Y9MSJ9.eyJqdGkiOiJ1c2VybmFtZS0xMjM0NSIsImlzcyI6Ik1BREFEQURBREFEQURBREFEQURBIiwic3ViIjoidXNlcm5hbWUiLCJuYmYiOjEyMTIxMjEyLCJleHAiOjEyMjA1ODEyLCJncmFudHMiOnsidm9pY2UiOnsiaW5jb21pbmdfYWxsb3ciOnRydWUsIm91dGdvaW5nX2FsbG93Ijp0cnVlfX19.T0li-AM7WAhioMwRdwYuIA-N7BRkhf8o9g366py7w1s');
|
||||
});
|
||||
});
|
||||
// describe('Jwt', function () {
|
||||
// it('should be created', function () {
|
||||
// let acctkn = new AccessToken('MADADADADADADADADADA', 'qwerty', 'username', {validFrom: 12121212, lifetime: 300}, 'username-12345');
|
||||
// acctkn.addVoiceGrants(true, true);
|
||||
// assert.equal(acctkn.toJwt(), 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsImN0eSI6InBsaXZvO3Y9MSJ9.eyJqdGkiOiJ1c2VybmFtZS0xMjM0NSIsImlzcyI6Ik1BREFEQURBREFEQURBREFEQURBIiwic3ViIjoidXNlcm5hbWUiLCJuYmYiOjEyMTIxMjEyLCJleHAiOjEyMjA1ODEyLCJncmFudHMiOnsidm9pY2UiOnsiaW5jb21pbmdfYWxsb3ciOnRydWUsIm91dGdvaW5nX2FsbG93Ijp0cnVlfX19.T0li-AM7WAhioMwRdwYuIA-N7BRkhf8o9g366py7w1s');
|
||||
// });
|
||||
// });
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import assert from 'assert';
|
||||
import sinon from 'sinon';
|
||||
import {Client} from '../lib/rest/client-test';
|
||||
import {PlivoGenericResponse} from '../lib/base.js';
|
||||
import assert from 'assert';
|
||||
import sinon from 'sinon';
|
||||
|
||||
let client = new Client('sampleid', 'sammpletoken', 'sampleproxy');
|
||||
|
||||
|
|
@ -20,12 +20,12 @@ describe('NumberInterface', function () {
|
|||
})
|
||||
});
|
||||
|
||||
it('add own number', function () {
|
||||
return client.numbers.addOwnNumber('+919999999990', 'carrier', 'region')
|
||||
.then(function(numbers) {
|
||||
assert.equal(numbers.message, 'changed')
|
||||
})
|
||||
});
|
||||
// it('add own number', function () {
|
||||
// return client.numbers.addOwnNumber('+919999999990', 'carrier', 'region')
|
||||
// .then(function(numbers) {
|
||||
// assert.equal(numbers.message, 'changed')
|
||||
// })
|
||||
// });
|
||||
|
||||
it('should throw error for number', function () {
|
||||
return client.numbers.addOwnNumber(null, 'carrier', 'region')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue