Skip to content

Commit cf6ae33

Browse files
committed
add token assertions
1 parent ed3e1de commit cf6ae33

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/token.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ test('get user data of token – default expiration', (t) => {
8787

8888
t.truthy(data)
8989
t.is(data.expiresIn, 60000)
90+
t.is(data.credentials.sub, fixtures.content.userData.sub)
91+
t.falsy(data.credentials.name)
9092
t.deepEqual(data.credentials.scope.sort(), ['editor', 'other-app:creator', 'realm:admin'])
9193
})
9294

@@ -97,5 +99,7 @@ test('get user data of token – default scopes', (t) => {
9799

98100
t.truthy(data)
99101
t.is(data.expiresIn, 4000)
102+
t.is(data.credentials.sub, fixtures.content.userData.sub)
103+
t.falsy(data.credentials.name)
100104
t.deepEqual(data.credentials.scope, [])
101105
})

0 commit comments

Comments
 (0)