]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/config.ts
Merge branch 'master' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / config.ts
index b65061a5dd21bcc35ce5a63bf6a5ff022b240115..facd1688d33998090ca71b8a19dec141c7052c68 100644 (file)
@@ -35,8 +35,10 @@ function checkInitialConfig (data: CustomConfig) {
   expect(data.cache.captions.size).to.equal(1)
   expect(data.signup.enabled).to.be.true
   expect(data.signup.limit).to.equal(4)
+  expect(data.signup.requiresEmailVerification).to.be.false
   expect(data.admin.email).to.equal('admin1@example.com')
   expect(data.user.videoQuota).to.equal(5242880)
+  expect(data.user.videoQuotaDaily).to.equal(-1)
   expect(data.transcoding.enabled).to.be.false
   expect(data.transcoding.threads).to.equal(2)
   expect(data.transcoding.resolutions['240p']).to.be.true
@@ -45,6 +47,7 @@ function checkInitialConfig (data: CustomConfig) {
   expect(data.transcoding.resolutions['720p']).to.be.true
   expect(data.transcoding.resolutions['1080p']).to.be.true
   expect(data.import.videos.http.enabled).to.be.true
+  expect(data.import.videos.torrent.enabled).to.be.true
 }
 
 function checkUpdatedConfig (data: CustomConfig) {
@@ -62,8 +65,10 @@ function checkUpdatedConfig (data: CustomConfig) {
   expect(data.cache.captions.size).to.equal(3)
   expect(data.signup.enabled).to.be.false
   expect(data.signup.limit).to.equal(5)
+  expect(data.signup.requiresEmailVerification).to.be.true
   expect(data.admin.email).to.equal('superadmin1@example.com')
   expect(data.user.videoQuota).to.equal(5242881)
+  expect(data.user.videoQuotaDaily).to.equal(318742)
   expect(data.transcoding.enabled).to.be.true
   expect(data.transcoding.threads).to.equal(1)
   expect(data.transcoding.resolutions['240p']).to.be.false
@@ -72,6 +77,7 @@ function checkUpdatedConfig (data: CustomConfig) {
   expect(data.transcoding.resolutions['720p']).to.be.false
   expect(data.transcoding.resolutions['1080p']).to.be.false
   expect(data.import.videos.http.enabled).to.be.false
+  expect(data.import.videos.torrent.enabled).to.be.false
 }
 
 describe('Test config', function () {
@@ -144,13 +150,15 @@ describe('Test config', function () {
       },
       signup: {
         enabled: false,
-        limit: 5
+        limit: 5,
+        requiresEmailVerification: true
       },
       admin: {
         email: 'superadmin1@example.com'
       },
       user: {
-        videoQuota: 5242881
+        videoQuota: 5242881,
+        videoQuotaDaily: 318742
       },
       transcoding: {
         enabled: true,
@@ -167,6 +175,9 @@ describe('Test config', function () {
         videos: {
           http: {
             enabled: false
+          },
+          torrent: {
+            enabled: false
           }
         }
       }