+ describe('When managing my scoped tokens', function () {
+
+ it('Should fail to get my scoped tokens with an non authenticated user', async function () {
+ await getUserScopedTokens(server.url, null, HttpStatusCode.UNAUTHORIZED_401)
+ })
+
+ it('Should fail to get my scoped tokens with a bad token', async function () {
+ await getUserScopedTokens(server.url, 'bad', HttpStatusCode.UNAUTHORIZED_401)
+
+ })
+
+ it('Should succeed to get my scoped tokens', async function () {
+ await getUserScopedTokens(server.url, server.accessToken)
+ })
+
+ it('Should fail to renew my scoped tokens with an non authenticated user', async function () {
+ await renewUserScopedTokens(server.url, null, HttpStatusCode.UNAUTHORIZED_401)
+ })
+
+ it('Should fail to renew my scoped tokens with a bad token', async function () {
+ await renewUserScopedTokens(server.url, 'bad', HttpStatusCode.UNAUTHORIZED_401)
+ })
+
+ it('Should succeed to renew my scoped tokens', async function () {
+ await renewUserScopedTokens(server.url, server.accessToken)
+ })
+ })
+