diff options
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, |