1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Begin to add avatar to actors

This commit is contained in:
Chocobozzz 2017-12-29 19:10:13 +01:00
parent 8b0d42ee37
commit c5911fd347
No known key found for this signature in database
GPG key ID: 583A612D890159BE
41 changed files with 498 additions and 177 deletions

View file

@ -6,7 +6,7 @@ import { UserRole } from '../../../../shared/index'
import {
createUser, flushTests, getBlacklistedVideosList, getMyUserInformation, getMyUserVideoRating, getUserInformation, getUsersList,
getUsersListPaginationAndSort, getVideosList, killallServers, login, makePutBodyRequest, rateVideo, registerUser, removeUser, removeVideo,
runServer, ServerInfo, serverLogin, updateMyUser, updateUser, uploadVideo
runServer, ServerInfo, serverLogin, testVideoImage, updateMyAvatar, updateMyUser, updateUser, uploadVideo
} from '../../utils/index'
import { follow } from '../../utils/server/follows'
import { setAccessTokensToServers } from '../../utils/users/login'
@ -340,6 +340,22 @@ describe('Test users', function () {
expect(user.id).to.be.a('number')
})
it('Should be able to update my avatar', async function () {
const fixture = 'avatar.png'
await updateMyAvatar({
url: server.url,
accessToken: accessTokenUser,
fixture
})
const res = await getMyUserInformation(server.url, accessTokenUser)
const user = res.body
const test = await testVideoImage(server.url, 'avatar', user.account.avatar.path, '.png')
expect(test).to.equal(true)
})
it('Should be able to update another user', async function () {
await updateUser({
url: server.url,