diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-26 10:03:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-26 10:03:40 +0200 |
commit | ed56ad1193bb5bb0a81fb843a11eb90d3fed9861 (patch) | |
tree | 64842447b4721978c69e1d2b3a964951c789c408 /server/tests/api/users/users-multiple-servers.ts | |
parent | d62cf3234ccfca0223a9639782635f0fb6594f8c (diff) | |
download | PeerTube-ed56ad1193bb5bb0a81fb843a11eb90d3fed9861.tar.gz PeerTube-ed56ad1193bb5bb0a81fb843a11eb90d3fed9861.tar.zst PeerTube-ed56ad1193bb5bb0a81fb843a11eb90d3fed9861.zip |
Add ability to update the user display name/description
Diffstat (limited to 'server/tests/api/users/users-multiple-servers.ts')
-rw-r--r-- | server/tests/api/users/users-multiple-servers.ts | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index a7f3aa8d3..8b9b63348 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts | |||
@@ -76,6 +76,22 @@ describe('Test users with multiple servers', function () { | |||
76 | await wait(5000) | 76 | await wait(5000) |
77 | }) | 77 | }) |
78 | 78 | ||
79 | it('Should be able to update my display name', async function () { | ||
80 | this.timeout(10000) | ||
81 | |||
82 | await updateMyUser({ | ||
83 | url: servers[0].url, | ||
84 | accessToken: servers[0].accessToken, | ||
85 | displayName: 'my super display name' | ||
86 | }) | ||
87 | |||
88 | const res = await getMyUserInformation(servers[0].url, servers[0].accessToken) | ||
89 | user = res.body | ||
90 | expect(user.account.displayName).to.equal('my super display name') | ||
91 | |||
92 | await wait(5000) | ||
93 | }) | ||
94 | |||
79 | it('Should be able to update my description', async function () { | 95 | it('Should be able to update my description', async function () { |
80 | this.timeout(10000) | 96 | this.timeout(10000) |
81 | 97 | ||
@@ -87,6 +103,7 @@ describe('Test users with multiple servers', function () { | |||
87 | 103 | ||
88 | const res = await getMyUserInformation(servers[0].url, servers[0].accessToken) | 104 | const res = await getMyUserInformation(servers[0].url, servers[0].accessToken) |
89 | user = res.body | 105 | user = res.body |
106 | expect(user.account.displayName).to.equal('my super display name') | ||
90 | expect(user.account.description).to.equal('my super description updated') | 107 | expect(user.account.description).to.equal('my super description updated') |
91 | 108 | ||
92 | await wait(5000) | 109 | await wait(5000) |
@@ -111,7 +128,7 @@ describe('Test users with multiple servers', function () { | |||
111 | await wait(5000) | 128 | await wait(5000) |
112 | }) | 129 | }) |
113 | 130 | ||
114 | it('Should have updated my avatar and my description on other servers too', async function () { | 131 | it('Should have updated my profile on other servers too', async function () { |
115 | for (const server of servers) { | 132 | for (const server of servers) { |
116 | const resAccounts = await getAccountsList(server.url, '-createdAt') | 133 | const resAccounts = await getAccountsList(server.url, '-createdAt') |
117 | 134 | ||
@@ -122,6 +139,7 @@ describe('Test users with multiple servers', function () { | |||
122 | const rootServer1Get = resAccount.body as Account | 139 | const rootServer1Get = resAccount.body as Account |
123 | expect(rootServer1Get.name).to.equal('root') | 140 | expect(rootServer1Get.name).to.equal('root') |
124 | expect(rootServer1Get.host).to.equal('localhost:9001') | 141 | expect(rootServer1Get.host).to.equal('localhost:9001') |
142 | expect(rootServer1Get.displayName).to.equal('my super display name') | ||
125 | expect(rootServer1Get.description).to.equal('my super description updated') | 143 | expect(rootServer1Get.description).to.equal('my super description updated') |
126 | 144 | ||
127 | await testImage(server.url, 'avatar2-resized', rootServer1Get.avatar.path, '.png') | 145 | await testImage(server.url, 'avatar2-resized', rootServer1Get.avatar.path, '.png') |