diff options
author | Chocobozzz <me@florianbigard.com> | 2019-02-11 09:30:29 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-02-11 10:37:27 +0100 |
commit | b426edd4854adc6e65844d8c54b8998e792b5778 (patch) | |
tree | b9ef4da0cdb2ab14c0aa1d67a883303f3ed0de14 /server/tests/api/users/users.ts | |
parent | 67b1d3fed765278bdc876cce393ef56d56942df0 (diff) | |
download | PeerTube-b426edd4854adc6e65844d8c54b8998e792b5778.tar.gz PeerTube-b426edd4854adc6e65844d8c54b8998e792b5778.tar.zst PeerTube-b426edd4854adc6e65844d8c54b8998e792b5778.zip |
Cleanup reset user password by admin
And add some tests
Diffstat (limited to 'server/tests/api/users/users.ts')
-rw-r--r-- | server/tests/api/users/users.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index ad98ab1c7..c4465d541 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -501,6 +501,22 @@ describe('Test users', function () { | |||
501 | accessTokenUser = await userLogin(server, user) | 501 | accessTokenUser = await userLogin(server, user) |
502 | }) | 502 | }) |
503 | 503 | ||
504 | it('Should be able to update another user password', async function () { | ||
505 | await updateUser({ | ||
506 | url: server.url, | ||
507 | userId, | ||
508 | accessToken, | ||
509 | password: 'password updated' | ||
510 | }) | ||
511 | |||
512 | await getMyUserVideoQuotaUsed(server.url, accessTokenUser, 401) | ||
513 | |||
514 | await userLogin(server, user, 400) | ||
515 | |||
516 | user.password = 'password updated' | ||
517 | accessTokenUser = await userLogin(server, user) | ||
518 | }) | ||
519 | |||
504 | it('Should be able to list video blacklist by a moderator', async function () { | 520 | it('Should be able to list video blacklist by a moderator', async function () { |
505 | await getBlacklistedVideosList(server.url, accessTokenUser) | 521 | await getBlacklistedVideosList(server.url, accessTokenUser) |
506 | }) | 522 | }) |