aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-29 19:10:13 +0100
committerChocobozzz <me@florianbigard.com>2017-12-29 19:10:13 +0100
commitc5911fd347c76e8bdc05ea9f3ee9efed4a58c236 (patch)
treeb8d287daca6c45305090cbec9da97d1155f275bd /server/tests/api/users
parent8b0d42ee372de6589796be26b83e5bffb1b69cdf (diff)
downloadPeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.tar.gz
PeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.tar.zst
PeerTube-c5911fd347c76e8bdc05ea9f3ee9efed4a58c236.zip
Begin to add avatar to actors
Diffstat (limited to 'server/tests/api/users')
-rw-r--r--server/tests/api/users/users.ts18
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'
6import { 6import {
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'
11import { follow } from '../../utils/server/follows' 11import { follow } from '../../utils/server/follows'
12import { setAccessTokensToServers } from '../../utils/users/login' 12import { 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,