diff options
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r-- | server/tests/api/check-params/users.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index 28537315e..e1954c64f 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -304,6 +304,20 @@ describe('Test users API validators', function () { | |||
304 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) | 304 | await makeUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) |
305 | }) | 305 | }) |
306 | 306 | ||
307 | it('Should fail with an unauthenticated user', async function () { | ||
308 | const fields = {} | ||
309 | const attaches = { | ||
310 | 'avatarfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') | ||
311 | } | ||
312 | await makeUploadRequest({ | ||
313 | url: server.url, | ||
314 | path: path + '/me/avatar/pick', | ||
315 | fields, | ||
316 | attaches, | ||
317 | statusCodeExpected: 401 | ||
318 | }) | ||
319 | }) | ||
320 | |||
307 | it('Should succeed with the correct params', async function () { | 321 | it('Should succeed with the correct params', async function () { |
308 | const fields = {} | 322 | const fields = {} |
309 | const attaches = { | 323 | const attaches = { |