mirror of
https://github.com/donl/plivo-node.git
synced 2026-06-30 06:12:08 -06:00
Changes in token creation
This commit is contained in:
parent
819d25d09b
commit
97fdeb44ad
1 changed files with 7 additions and 2 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue