aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users/users.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/users/users.ts')
-rw-r--r--server/tests/api/users/users.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts
index cea98aac7..363236b62 100644
--- a/server/tests/api/users/users.ts
+++ b/server/tests/api/users/users.ts
@@ -93,16 +93,16 @@ describe('Test users', function () {
93 const client = { id: 'client', secret: server.client.secret } 93 const client = { id: 'client', secret: server.client.secret }
94 const res = await login(server.url, client, server.user, HttpStatusCode.BAD_REQUEST_400) 94 const res = await login(server.url, client, server.user, HttpStatusCode.BAD_REQUEST_400)
95 95
96 expect(res.body.code).to.equal('invalid_client') 96 expect(res.body.type).to.equal('invalid_client')
97 expect(res.body.error).to.contain('client is invalid') 97 expect(res.body.detail).to.contain('client is invalid')
98 }) 98 })
99 99
100 it('Should not login with an invalid client secret', async function () { 100 it('Should not login with an invalid client secret', async function () {
101 const client = { id: server.client.id, secret: 'coucou' } 101 const client = { id: server.client.id, secret: 'coucou' }
102 const res = await login(server.url, client, server.user, HttpStatusCode.BAD_REQUEST_400) 102 const res = await login(server.url, client, server.user, HttpStatusCode.BAD_REQUEST_400)
103 103
104 expect(res.body.code).to.equal('invalid_client') 104 expect(res.body.type).to.equal('invalid_client')
105 expect(res.body.error).to.contain('client is invalid') 105 expect(res.body.detail).to.contain('client is invalid')
106 }) 106 })
107 }) 107 })
108 108
@@ -112,16 +112,16 @@ describe('Test users', function () {
112 const user = { username: 'captain crochet', password: server.user.password } 112 const user = { username: 'captain crochet', password: server.user.password }
113 const res = await login(server.url, server.client, user, HttpStatusCode.BAD_REQUEST_400) 113 const res = await login(server.url, server.client, user, HttpStatusCode.BAD_REQUEST_400)
114 114
115 expect(res.body.code).to.equal('invalid_grant') 115 expect(res.body.type).to.equal('invalid_grant')
116 expect(res.body.error).to.contain('credentials are invalid') 116 expect(res.body.detail).to.contain('credentials are invalid')
117 }) 117 })
118 118
119 it('Should not login with an invalid password', async function () { 119 it('Should not login with an invalid password', async function () {
120 const user = { username: server.user.username, password: 'mew_three' } 120 const user = { username: server.user.username, password: 'mew_three' }
121 const res = await login(server.url, server.client, user, HttpStatusCode.BAD_REQUEST_400) 121 const res = await login(server.url, server.client, user, HttpStatusCode.BAD_REQUEST_400)
122 122
123 expect(res.body.code).to.equal('invalid_grant') 123 expect(res.body.type).to.equal('invalid_grant')
124 expect(res.body.error).to.contain('credentials are invalid') 124 expect(res.body.detail).to.contain('credentials are invalid')
125 }) 125 })
126 126
127 it('Should not be able to upload a video', async function () { 127 it('Should not be able to upload a video', async function () {