diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-31 16:42:40 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-31 16:42:40 +0100 |
commit | 66b16cafb380012d3eca14e524d86f2450e04069 (patch) | |
tree | 02a6d2327e2499dbe921c22a03b8a9d741773dd6 /server/tests | |
parent | 81ebea48bfba2d81e62dd7a0f01a0cadf41d2607 (diff) | |
download | PeerTube-66b16cafb380012d3eca14e524d86f2450e04069.tar.gz PeerTube-66b16cafb380012d3eca14e524d86f2450e04069.tar.zst PeerTube-66b16cafb380012d3eca14e524d86f2450e04069.zip |
Add new name/terms/description config options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/check-params/config.ts | 5 | ||||
-rw-r--r-- | server/tests/api/server/config.ts | 12 | ||||
-rw-r--r-- | server/tests/utils/videos/videos.ts | 2 |
3 files changed, 17 insertions, 2 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index a2a404702..efc1e4e09 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts | |||
@@ -14,6 +14,11 @@ describe('Test config API validators', function () { | |||
14 | let server: ServerInfo | 14 | let server: ServerInfo |
15 | let userAccessToken: string | 15 | let userAccessToken: string |
16 | const updateParams: CustomConfig = { | 16 | const updateParams: CustomConfig = { |
17 | instance: { | ||
18 | name: 'PeerTube updated', | ||
19 | description: 'my super description', | ||
20 | terms: 'my super terms' | ||
21 | }, | ||
17 | cache: { | 22 | cache: { |
18 | previews: { | 23 | previews: { |
19 | size: 2 | 24 | size: 2 |
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index a1f8212bb..f83e21e82 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts | |||
@@ -49,6 +49,9 @@ describe('Test config', function () { | |||
49 | const res = await getCustomConfig(server.url, server.accessToken) | 49 | const res = await getCustomConfig(server.url, server.accessToken) |
50 | const data = res.body | 50 | const data = res.body |
51 | 51 | ||
52 | expect(data.instance.name).to.equal('PeerTube') | ||
53 | expect(data.instance.description).to.be.empty | ||
54 | expect(data.instance.terms).to.be.empty | ||
52 | expect(data.cache.previews.size).to.equal(1) | 55 | expect(data.cache.previews.size).to.equal(1) |
53 | expect(data.signup.enabled).to.be.true | 56 | expect(data.signup.enabled).to.be.true |
54 | expect(data.signup.limit).to.equal(4) | 57 | expect(data.signup.limit).to.equal(4) |
@@ -65,6 +68,11 @@ describe('Test config', function () { | |||
65 | 68 | ||
66 | it('Should update the customized configuration', async function () { | 69 | it('Should update the customized configuration', async function () { |
67 | const newCustomConfig = { | 70 | const newCustomConfig = { |
71 | instance: { | ||
72 | name: 'PeerTube updated', | ||
73 | description: 'my super description', | ||
74 | terms: 'my super terms' | ||
75 | }, | ||
68 | cache: { | 76 | cache: { |
69 | previews: { | 77 | previews: { |
70 | size: 2 | 78 | size: 2 |
@@ -97,7 +105,9 @@ describe('Test config', function () { | |||
97 | const res = await getCustomConfig(server.url, server.accessToken) | 105 | const res = await getCustomConfig(server.url, server.accessToken) |
98 | const data = res.body | 106 | const data = res.body |
99 | 107 | ||
100 | expect(data.cache.previews.size).to.equal(2) | 108 | expect(data.instance.name).to.equal('PeerTube updated') |
109 | expect(data.instance.description).to.equal('my super description') | ||
110 | expect(data.instance.terms).to.equal('my super terms') | ||
101 | expect(data.signup.enabled).to.be.false | 111 | expect(data.signup.enabled).to.be.false |
102 | expect(data.signup.limit).to.equal(5) | 112 | expect(data.signup.limit).to.equal(5) |
103 | expect(data.admin.email).to.equal('superadmin1@example.com') | 113 | expect(data.admin.email).to.equal('superadmin1@example.com') |
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts index 860f04fd8..0b28edd48 100644 --- a/server/tests/utils/videos/videos.ts +++ b/server/tests/utils/videos/videos.ts | |||
@@ -373,7 +373,7 @@ async function completeVideoCheck ( | |||
373 | expect(dateIsValid(video.createdAt)).to.be.true | 373 | expect(dateIsValid(video.createdAt)).to.be.true |
374 | expect(dateIsValid(video.updatedAt)).to.be.true | 374 | expect(dateIsValid(video.updatedAt)).to.be.true |
375 | 375 | ||
376 | const res = await getVideo(url, video.id) | 376 | const res = await getVideo(url, video.uuid) |
377 | const videoDetails = res.body | 377 | const videoDetails = res.body |
378 | 378 | ||
379 | expect(videoDetails.files).to.have.lengthOf(attributes.files.length) | 379 | expect(videoDetails.files).to.have.lengthOf(attributes.files.length) |