aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
authorWicklow <123956049+wickloww@users.noreply.github.com>2023-04-07 08:09:54 +0000
committerGitHub <noreply@github.com>2023-04-07 10:09:54 +0200
commitb302c80dc0d9ba8eabef9ef6576efe36afc57584 (patch)
tree14d406b41291805deb94a36a5e79f8d6989355f8 /server/tests/api/check-params
parent9258e9a4a37911fc64b5faada2a7e604bd1ede1f (diff)
downloadPeerTube-b302c80dc0d9ba8eabef9ef6576efe36afc57584.tar.gz
PeerTube-b302c80dc0d9ba8eabef9ef6576efe36afc57584.tar.zst
PeerTube-b302c80dc0d9ba8eabef9ef6576efe36afc57584.zip
feature/ability to disable video history by default (#5728)
* draft: ability to disable video history by default * Update configuration and add tests * Updated code based on review comments * Add tests on registration and video quota * Remove required video quotas in query * Fix tests
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/config.ts5
-rw-r--r--server/tests/api/check-params/users-admin.ts12
2 files changed, 5 insertions, 12 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index 93a3f3eb9..f49a4b868 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -90,6 +90,11 @@ describe('Test config API validators', function () {
90 enabled: false 90 enabled: false
91 }, 91 },
92 user: { 92 user: {
93 history: {
94 videos: {
95 enabled: true
96 }
97 },
93 videoQuota: 5242881, 98 videoQuota: 5242881,
94 videoQuotaDaily: 318742 99 videoQuotaDaily: 318742
95 }, 100 },
diff --git a/server/tests/api/check-params/users-admin.ts b/server/tests/api/check-params/users-admin.ts
index be2496bb4..819da0bb2 100644
--- a/server/tests/api/check-params/users-admin.ts
+++ b/server/tests/api/check-params/users-admin.ts
@@ -216,18 +216,6 @@ describe('Test users admin API validators', function () {
216 }) 216 })
217 }) 217 })
218 218
219 it('Should fail without a videoQuota', async function () {
220 const fields = omit(baseCorrectParams, [ 'videoQuota' ])
221
222 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
223 })
224
225 it('Should fail without a videoQuotaDaily', async function () {
226 const fields = omit(baseCorrectParams, [ 'videoQuotaDaily' ])
227
228 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
229 })
230
231 it('Should fail with an invalid videoQuota', async function () { 219 it('Should fail with an invalid videoQuota', async function () {
232 const fields = { ...baseCorrectParams, videoQuota: -5 } 220 const fields = { ...baseCorrectParams, videoQuota: -5 }
233 221