aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users/users-multiple-servers.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-15 14:46:26 +0100
committerChocobozzz <me@florianbigard.com>2018-02-15 15:29:07 +0100
commit2422c46b27790d94fd29a7092170cee5a1b56008 (patch)
treed5c1942ce20cadb27a551d87c789edfe92f5b105 /server/tests/api/users/users-multiple-servers.ts
parent34cbef8c6cc912143a421413bdd832c4adcc556a (diff)
downloadPeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.gz
PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.zst
PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.zip
Implement support field in video and video channel
Diffstat (limited to 'server/tests/api/users/users-multiple-servers.ts')
-rw-r--r--server/tests/api/users/users-multiple-servers.ts24
1 files changed, 22 insertions, 2 deletions
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts
index 3c4eaff14..bb458f7a5 100644
--- a/server/tests/api/users/users-multiple-servers.ts
+++ b/server/tests/api/users/users-multiple-servers.ts
@@ -3,7 +3,10 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { Account } from '../../../../shared/models/actors' 5import { Account } from '../../../../shared/models/actors'
6import { checkVideoFilesWereRemoved, createUser, doubleFollow, flushAndRunMultipleServers, removeUser, userLogin, wait } from '../../utils' 6import {
7 checkVideoFilesWereRemoved, createUser, doubleFollow, flushAndRunMultipleServers, removeUser, updateMyUser, userLogin,
8 wait
9} from '../../utils'
7import { flushTests, getMyUserInformation, killallServers, ServerInfo, testImage, updateMyAvatar, uploadVideo } from '../../utils/index' 10import { flushTests, getMyUserInformation, killallServers, ServerInfo, testImage, updateMyAvatar, uploadVideo } from '../../utils/index'
8import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../utils/users/accounts' 11import { checkActorFilesWereRemoved, getAccount, getAccountsList } from '../../utils/users/accounts'
9import { setAccessTokensToServers } from '../../utils/users/login' 12import { setAccessTokensToServers } from '../../utils/users/login'
@@ -51,6 +54,22 @@ describe('Test users with multiple servers', function () {
51 await wait(5000) 54 await wait(5000)
52 }) 55 })
53 56
57 it('Should be able to update my description', async function () {
58 this.timeout(10000)
59
60 await updateMyUser({
61 url: servers[0].url,
62 accessToken: servers[0].accessToken,
63 description: 'my super description updated'
64 })
65
66 const res = await getMyUserInformation(servers[0].url, servers[0].accessToken)
67 user = res.body
68 expect(user.account.description).to.equal('my super description updated')
69
70 await wait(5000)
71 })
72
54 it('Should be able to update my avatar', async function () { 73 it('Should be able to update my avatar', async function () {
55 this.timeout(10000) 74 this.timeout(10000)
56 75
@@ -70,7 +89,7 @@ describe('Test users with multiple servers', function () {
70 await wait(5000) 89 await wait(5000)
71 }) 90 })
72 91
73 it('Should have updated my avatar on other servers too', async function () { 92 it('Should have updated my avatar and my description on other servers too', async function () {
74 for (const server of servers) { 93 for (const server of servers) {
75 const resAccounts = await getAccountsList(server.url, '-createdAt') 94 const resAccounts = await getAccountsList(server.url, '-createdAt')
76 95
@@ -81,6 +100,7 @@ describe('Test users with multiple servers', function () {
81 const rootServer1Get = resAccount.body as Account 100 const rootServer1Get = resAccount.body as Account
82 expect(rootServer1Get.name).to.equal('root') 101 expect(rootServer1Get.name).to.equal('root')
83 expect(rootServer1Get.host).to.equal('localhost:9001') 102 expect(rootServer1Get.host).to.equal('localhost:9001')
103 expect(rootServer1Get.description).to.equal('my super description updated')
84 104
85 await testImage(server.url, 'avatar2-resized', rootServer1Get.avatar.path, '.png') 105 await testImage(server.url, 'avatar2-resized', rootServer1Get.avatar.path, '.png')
86 } 106 }