diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-15 14:46:26 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-15 15:29:07 +0100 |
commit | 2422c46b27790d94fd29a7092170cee5a1b56008 (patch) | |
tree | d5c1942ce20cadb27a551d87c789edfe92f5b105 /server/tests/api/users/users.ts | |
parent | 34cbef8c6cc912143a421413bdd832c4adcc556a (diff) | |
download | PeerTube-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.ts')
-rw-r--r-- | server/tests/api/users/users.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index ac167d4f9..c650a74f5 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -172,6 +172,7 @@ describe('Test users', function () { | |||
172 | expect(user.videoQuota).to.equal(2 * 1024 * 1024) | 172 | expect(user.videoQuota).to.equal(2 * 1024 * 1024) |
173 | expect(user.roleLabel).to.equal('User') | 173 | expect(user.roleLabel).to.equal('User') |
174 | expect(user.id).to.be.a('number') | 174 | expect(user.id).to.be.a('number') |
175 | expect(user.account.description).to.be.null | ||
175 | }) | 176 | }) |
176 | 177 | ||
177 | it('Should be able to upload a video with this user', async function () { | 178 | it('Should be able to upload a video with this user', async function () { |
@@ -315,6 +316,7 @@ describe('Test users', function () { | |||
315 | expect(user.displayNSFW).to.be.ok | 316 | expect(user.displayNSFW).to.be.ok |
316 | expect(user.videoQuota).to.equal(2 * 1024 * 1024) | 317 | expect(user.videoQuota).to.equal(2 * 1024 * 1024) |
317 | expect(user.id).to.be.a('number') | 318 | expect(user.id).to.be.a('number') |
319 | expect(user.account.description).to.be.null | ||
318 | }) | 320 | }) |
319 | 321 | ||
320 | it('Should be able to change the autoPlayVideo attribute', async function () { | 322 | it('Should be able to change the autoPlayVideo attribute', async function () { |
@@ -345,6 +347,7 @@ describe('Test users', function () { | |||
345 | expect(user.displayNSFW).to.be.ok | 347 | expect(user.displayNSFW).to.be.ok |
346 | expect(user.videoQuota).to.equal(2 * 1024 * 1024) | 348 | expect(user.videoQuota).to.equal(2 * 1024 * 1024) |
347 | expect(user.id).to.be.a('number') | 349 | expect(user.id).to.be.a('number') |
350 | expect(user.account.description).to.be.null | ||
348 | }) | 351 | }) |
349 | 352 | ||
350 | it('Should be able to update my avatar', async function () { | 353 | it('Should be able to update my avatar', async function () { |
@@ -362,6 +365,24 @@ describe('Test users', function () { | |||
362 | await testImage(server.url, 'avatar-resized', user.account.avatar.path, '.png') | 365 | await testImage(server.url, 'avatar-resized', user.account.avatar.path, '.png') |
363 | }) | 366 | }) |
364 | 367 | ||
368 | it('Should be able to update my description', async function () { | ||
369 | await updateMyUser({ | ||
370 | url: server.url, | ||
371 | accessToken: accessTokenUser, | ||
372 | description: 'my super description updated' | ||
373 | }) | ||
374 | |||
375 | const res = await getMyUserInformation(server.url, accessTokenUser) | ||
376 | const user = res.body | ||
377 | |||
378 | expect(user.username).to.equal('user_1') | ||
379 | expect(user.email).to.equal('updated@example.com') | ||
380 | expect(user.displayNSFW).to.be.ok | ||
381 | expect(user.videoQuota).to.equal(2 * 1024 * 1024) | ||
382 | expect(user.id).to.be.a('number') | ||
383 | expect(user.account.description).to.equal('my super description updated') | ||
384 | }) | ||
385 | |||
365 | it('Should be able to update another user', async function () { | 386 | it('Should be able to update another user', async function () { |
366 | await updateUser({ | 387 | await updateUser({ |
367 | url: server.url, | 388 | url: server.url, |