diff options
Diffstat (limited to 'server/tests/api/users/users.ts')
-rw-r--r-- | server/tests/api/users/users.ts | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 19549acdd..3390b2d56 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -6,7 +6,7 @@ import { UserRole } from '../../../../shared/index' | |||
6 | import { | 6 | import { |
7 | createUser, flushTests, getBlacklistedVideosList, getMyUserInformation, getMyUserVideoRating, getUserInformation, getUsersList, | 7 | createUser, flushTests, getBlacklistedVideosList, getMyUserInformation, getMyUserVideoRating, getUserInformation, getUsersList, |
8 | getUsersListPaginationAndSort, getVideosList, killallServers, login, makePutBodyRequest, rateVideo, registerUser, removeUser, removeVideo, | 8 | getUsersListPaginationAndSort, getVideosList, killallServers, login, makePutBodyRequest, rateVideo, registerUser, removeUser, removeVideo, |
9 | runServer, ServerInfo, serverLogin, updateMyUser, updateUser, uploadVideo | 9 | runServer, ServerInfo, serverLogin, testVideoImage, updateMyAvatar, updateMyUser, updateUser, uploadVideo |
10 | } from '../../utils/index' | 10 | } from '../../utils/index' |
11 | import { follow } from '../../utils/server/follows' | 11 | import { follow } from '../../utils/server/follows' |
12 | import { setAccessTokensToServers } from '../../utils/users/login' | 12 | import { setAccessTokensToServers } from '../../utils/users/login' |
@@ -340,6 +340,22 @@ describe('Test users', function () { | |||
340 | expect(user.id).to.be.a('number') | 340 | expect(user.id).to.be.a('number') |
341 | }) | 341 | }) |
342 | 342 | ||
343 | it('Should be able to update my avatar', async function () { | ||
344 | const fixture = 'avatar.png' | ||
345 | |||
346 | await updateMyAvatar({ | ||
347 | url: server.url, | ||
348 | accessToken: accessTokenUser, | ||
349 | fixture | ||
350 | }) | ||
351 | |||
352 | const res = await getMyUserInformation(server.url, accessTokenUser) | ||
353 | const user = res.body | ||
354 | |||
355 | const test = await testVideoImage(server.url, 'avatar', user.account.avatar.path, '.png') | ||
356 | expect(test).to.equal(true) | ||
357 | }) | ||
358 | |||
343 | it('Should be able to update another user', async function () { | 359 | it('Should be able to update another user', async function () { |
344 | await updateUser({ | 360 | await updateUser({ |
345 | url: server.url, | 361 | url: server.url, |