aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-25 09:50:12 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-11-25 10:07:51 +0100
commitf619de0e435f7ac3abad2ec772397486358b56e7 (patch)
tree991040ca204e95a3322e02fdc9867a8f6b69c1e8 /server/tests/api/users
parent6b67897e2eab96978daee40aeaf716835856d65d (diff)
downloadPeerTube-f619de0e435f7ac3abad2ec772397486358b56e7.tar.gz
PeerTube-f619de0e435f7ac3abad2ec772397486358b56e7.tar.zst
PeerTube-f619de0e435f7ac3abad2ec772397486358b56e7.zip
Add tests to gif resizer
Diffstat (limited to 'server/tests/api/users')
-rw-r--r--server/tests/api/users/users.ts23
1 files changed, 20 insertions, 3 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts
index edb0b4bb3..fe83ca041 100644
--- a/server/tests/api/users/users.ts
+++ b/server/tests/api/users/users.ts
@@ -602,8 +602,8 @@ describe('Test users', function () {
602 expect(user.account.description).to.be.null 602 expect(user.account.description).to.be.null
603 }) 603 })
604 604
605 it('Should be able to update my avatar', async function () { 605 it('Should be able to update my avatar with a gif', async function () {
606 const fixture = 'avatar.png' 606 const fixture = 'avatar.gif'
607 607
608 await updateMyAvatar({ 608 await updateMyAvatar({
609 url: server.url, 609 url: server.url,
@@ -614,7 +614,24 @@ describe('Test users', function () {
614 const res = await getMyUserInformation(server.url, accessTokenUser) 614 const res = await getMyUserInformation(server.url, accessTokenUser)
615 const user = res.body 615 const user = res.body
616 616
617 await testImage(server.url, 'avatar-resized', user.account.avatar.path, '.png') 617 await testImage(server.url, 'avatar-resized', user.account.avatar.path, '.gif')
618 })
619
620 it('Should be able to update my avatar with a gif, and then a png', async function () {
621 for (const extension of [ '.png', '.gif' ]) {
622 const fixture = 'avatar' + extension
623
624 await updateMyAvatar({
625 url: server.url,
626 accessToken: accessTokenUser,
627 fixture
628 })
629
630 const res = await getMyUserInformation(server.url, accessTokenUser)
631 const user = res.body
632
633 await testImage(server.url, 'avatar-resized', user.account.avatar.path, extension)
634 }
618 }) 635 })
619 636
620 it('Should be able to update my display name', async function () { 637 it('Should be able to update my display name', async function () {