diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-15 15:58:10 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-16 10:08:55 +0100 |
commit | a9bfa85d2cdf13670aaced740da5b493fbeddfce (patch) | |
tree | 3781c9218d4cc7786b6589365c0efbed2151703d /server/tests/api/users/users.ts | |
parent | c77fdc605b3ccc1ab6890f889d8200fbe9372949 (diff) | |
download | PeerTube-a9bfa85d2cdf13670aaced740da5b493fbeddfce.tar.gz PeerTube-a9bfa85d2cdf13670aaced740da5b493fbeddfce.tar.zst PeerTube-a9bfa85d2cdf13670aaced740da5b493fbeddfce.zip |
Add ability for admins to set default p2p policy
Diffstat (limited to 'server/tests/api/users/users.ts')
-rw-r--r-- | server/tests/api/users/users.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 6c41e7d56..f00cbab5a 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -559,6 +559,28 @@ describe('Test users', function () { | |||
559 | expect(user.autoPlayNextVideo).to.be.true | 559 | expect(user.autoPlayNextVideo).to.be.true |
560 | }) | 560 | }) |
561 | 561 | ||
562 | it('Should be able to change the p2p attribute', async function () { | ||
563 | { | ||
564 | await server.users.updateMe({ | ||
565 | token: userToken, | ||
566 | webTorrentEnabled: false | ||
567 | }) | ||
568 | |||
569 | const user = await server.users.getMyInfo({ token: userToken }) | ||
570 | expect(user.p2pEnabled).to.be.false | ||
571 | } | ||
572 | |||
573 | { | ||
574 | await server.users.updateMe({ | ||
575 | token: userToken, | ||
576 | p2pEnabled: true | ||
577 | }) | ||
578 | |||
579 | const user = await server.users.getMyInfo({ token: userToken }) | ||
580 | expect(user.p2pEnabled).to.be.true | ||
581 | } | ||
582 | }) | ||
583 | |||
562 | it('Should be able to change the email attribute', async function () { | 584 | it('Should be able to change the email attribute', async function () { |
563 | await server.users.updateMe({ | 585 | await server.users.updateMe({ |
564 | token: userToken, | 586 | token: userToken, |