Skip to content

Commit

Permalink
WIP: More tests for backward comp and fixed middleware - #70
Browse files Browse the repository at this point in the history
  • Loading branch information
tiblu committed Jan 14, 2019
1 parent 4592461 commit 1c49bdc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/api/topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -6303,11 +6303,11 @@ suite('Users', function () {

var bdocUri = statusresponse.data.bdocUri;

// Check for a valid token
var token = bdocUri.slice(bdocUri.indexOf('token=') + 6);
var tokenData = jwt.verify(token, config.session.publicKey, {algorithms: [config.session.algorithm]});
assert.equal(tokenData.userId, user.id);
var tokenData = cosJwt.verifyTokenRestrictedUse(token, 'GET ' + bdocpathExpected);

assert.equal(tokenData.path, bdocpathExpected);
assert.equal(tokenData.userId, user.id);

done();
}
Expand Down

0 comments on commit 1c49bdc

Please sign in to comment.