diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-03 11:10:40 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-03 11:10:40 +0100 |
commit | 01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea (patch) | |
tree | 9e01809f09adbcd512a8dedf73093a123f88e02c /server/tests/api/check-params/users.ts | |
parent | 47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04 (diff) | |
download | PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.tar.gz PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.tar.zst PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.zip |
Add avatar max size limit
Diffstat (limited to 'server/tests/api/check-params/users.ts')
-rw-r--r-- | server/tests/api/check-params/users.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index 33d92ac24..14fcf8703 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts | |||
@@ -276,6 +276,14 @@ describe('Test users API validators', function () { | |||
276 | await makePostUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) | 276 | await makePostUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) |
277 | }) | 277 | }) |
278 | 278 | ||
279 | it('Should fail with a big file', async function () { | ||
280 | const fields = {} | ||
281 | const attaches = { | ||
282 | 'avatarfile': join(__dirname, '..', 'fixtures', 'avatar-big.png') | ||
283 | } | ||
284 | await makePostUploadRequest({ url: server.url, path: path + '/me/avatar/pick', token: server.accessToken, fields, attaches }) | ||
285 | }) | ||
286 | |||
279 | it('Should succeed with the correct params', async function () { | 287 | it('Should succeed with the correct params', async function () { |
280 | const fields = {} | 288 | const fields = {} |
281 | const attaches = { | 289 | const attaches = { |