diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-03-28 21:19:46 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-03-28 21:19:46 +0200 |
commit | 31b59b477459d4f26ed8ef089a0e5553fb6a332b (patch) | |
tree | 70de15dc172045d01ad45718f55c22d5ca43b354 /server/tests/api/multiple-pods.js | |
parent | d07137b90b2b2b0c1e93a6f0e7bf8719b133027c (diff) | |
download | PeerTube-31b59b477459d4f26ed8ef089a0e5553fb6a332b.tar.gz PeerTube-31b59b477459d4f26ed8ef089a0e5553fb6a332b.tar.zst PeerTube-31b59b477459d4f26ed8ef089a0e5553fb6a332b.zip |
Server: add nsfw attribute
Diffstat (limited to 'server/tests/api/multiple-pods.js')
-rw-r--r-- | server/tests/api/multiple-pods.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/server/tests/api/multiple-pods.js b/server/tests/api/multiple-pods.js index 69ef38c20..cc4f7be70 100644 --- a/server/tests/api/multiple-pods.js +++ b/server/tests/api/multiple-pods.js | |||
@@ -84,6 +84,7 @@ describe('Test multiple pods', function () { | |||
84 | name: 'my super name for pod 1', | 84 | name: 'my super name for pod 1', |
85 | category: 5, | 85 | category: 5, |
86 | licence: 4, | 86 | licence: 4, |
87 | nsfw: true, | ||
87 | description: 'my super description for pod 1', | 88 | description: 'my super description for pod 1', |
88 | tags: [ 'tag1p1', 'tag2p1' ], | 89 | tags: [ 'tag1p1', 'tag2p1' ], |
89 | fixture: 'video_short1.webm' | 90 | fixture: 'video_short1.webm' |
@@ -112,6 +113,7 @@ describe('Test multiple pods', function () { | |||
112 | expect(video.categoryLabel).to.equal('Sports') | 113 | expect(video.categoryLabel).to.equal('Sports') |
113 | expect(video.licence).to.equal(4) | 114 | expect(video.licence).to.equal(4) |
114 | expect(video.licenceLabel).to.equal('Attribution - Non Commercial') | 115 | expect(video.licenceLabel).to.equal('Attribution - Non Commercial') |
116 | expect(video.nsfw).to.be.truthy | ||
115 | expect(video.description).to.equal('my super description for pod 1') | 117 | expect(video.description).to.equal('my super description for pod 1') |
116 | expect(video.podHost).to.equal('localhost:9001') | 118 | expect(video.podHost).to.equal('localhost:9001') |
117 | expect(video.magnetUri).to.exist | 119 | expect(video.magnetUri).to.exist |
@@ -155,6 +157,7 @@ describe('Test multiple pods', function () { | |||
155 | name: 'my super name for pod 2', | 157 | name: 'my super name for pod 2', |
156 | category: 4, | 158 | category: 4, |
157 | licence: 3, | 159 | licence: 3, |
160 | nsfw: true, | ||
158 | description: 'my super description for pod 2', | 161 | description: 'my super description for pod 2', |
159 | tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ], | 162 | tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ], |
160 | fixture: 'video_short2.webm' | 163 | fixture: 'video_short2.webm' |
@@ -183,6 +186,7 @@ describe('Test multiple pods', function () { | |||
183 | expect(video.categoryLabel).to.equal('Art') | 186 | expect(video.categoryLabel).to.equal('Art') |
184 | expect(video.licence).to.equal(3) | 187 | expect(video.licence).to.equal(3) |
185 | expect(video.licenceLabel).to.equal('Attribution - No Derivatives') | 188 | expect(video.licenceLabel).to.equal('Attribution - No Derivatives') |
189 | expect(video.nsfw).to.be.falsy | ||
186 | expect(video.description).to.equal('my super description for pod 2') | 190 | expect(video.description).to.equal('my super description for pod 2') |
187 | expect(video.podHost).to.equal('localhost:9002') | 191 | expect(video.podHost).to.equal('localhost:9002') |
188 | expect(video.magnetUri).to.exist | 192 | expect(video.magnetUri).to.exist |
@@ -226,6 +230,7 @@ describe('Test multiple pods', function () { | |||
226 | name: 'my super name for pod 3', | 230 | name: 'my super name for pod 3', |
227 | category: 6, | 231 | category: 6, |
228 | licence: 5, | 232 | licence: 5, |
233 | nsfw: true, | ||
229 | description: 'my super description for pod 3', | 234 | description: 'my super description for pod 3', |
230 | tags: [ 'tag1p3' ], | 235 | tags: [ 'tag1p3' ], |
231 | fixture: 'video_short3.webm' | 236 | fixture: 'video_short3.webm' |
@@ -237,6 +242,7 @@ describe('Test multiple pods', function () { | |||
237 | name: 'my super name for pod 3-2', | 242 | name: 'my super name for pod 3-2', |
238 | category: 7, | 243 | category: 7, |
239 | licence: 6, | 244 | licence: 6, |
245 | nsfw: false, | ||
240 | description: 'my super description for pod 3-2', | 246 | description: 'my super description for pod 3-2', |
241 | tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ], | 247 | tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ], |
242 | fixture: 'video_short.webm' | 248 | fixture: 'video_short.webm' |
@@ -275,6 +281,7 @@ describe('Test multiple pods', function () { | |||
275 | expect(video1.categoryLabel).to.equal('Travels') | 281 | expect(video1.categoryLabel).to.equal('Travels') |
276 | expect(video1.licence).to.equal(5) | 282 | expect(video1.licence).to.equal(5) |
277 | expect(video1.licenceLabel).to.equal('Attribution - Non Commercial - Share Alike') | 283 | expect(video1.licenceLabel).to.equal('Attribution - Non Commercial - Share Alike') |
284 | expect(video1.nsfw).to.be.truthy | ||
278 | expect(video1.description).to.equal('my super description for pod 3') | 285 | expect(video1.description).to.equal('my super description for pod 3') |
279 | expect(video1.podHost).to.equal('localhost:9003') | 286 | expect(video1.podHost).to.equal('localhost:9003') |
280 | expect(video1.magnetUri).to.exist | 287 | expect(video1.magnetUri).to.exist |
@@ -289,6 +296,7 @@ describe('Test multiple pods', function () { | |||
289 | expect(video2.categoryLabel).to.equal('Gaming') | 296 | expect(video2.categoryLabel).to.equal('Gaming') |
290 | expect(video2.licence).to.equal(6) | 297 | expect(video2.licence).to.equal(6) |
291 | expect(video2.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives') | 298 | expect(video2.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives') |
299 | expect(video2.nsfw).to.be.falsy | ||
292 | expect(video2.description).to.equal('my super description for pod 3-2') | 300 | expect(video2.description).to.equal('my super description for pod 3-2') |
293 | expect(video2.podHost).to.equal('localhost:9003') | 301 | expect(video2.podHost).to.equal('localhost:9003') |
294 | expect(video2.magnetUri).to.exist | 302 | expect(video2.magnetUri).to.exist |
@@ -638,6 +646,7 @@ describe('Test multiple pods', function () { | |||
638 | name: 'my super video updated', | 646 | name: 'my super video updated', |
639 | category: 10, | 647 | category: 10, |
640 | licence: 7, | 648 | licence: 7, |
649 | nsfw: true, | ||
641 | description: 'my super description updated', | 650 | description: 'my super description updated', |
642 | tags: [ 'tagup1', 'tagup2' ] | 651 | tags: [ 'tagup1', 'tagup2' ] |
643 | } | 652 | } |
@@ -668,6 +677,7 @@ describe('Test multiple pods', function () { | |||
668 | expect(videoUpdated.categoryLabel).to.equal('Entertainment') | 677 | expect(videoUpdated.categoryLabel).to.equal('Entertainment') |
669 | expect(videoUpdated.licence).to.equal(7) | 678 | expect(videoUpdated.licence).to.equal(7) |
670 | expect(videoUpdated.licenceLabel).to.equal('Public Domain Dedication') | 679 | expect(videoUpdated.licenceLabel).to.equal('Public Domain Dedication') |
680 | expect(videoUpdated.nsfw).to.be.truthy | ||
671 | expect(videoUpdated.description).to.equal('my super description updated') | 681 | expect(videoUpdated.description).to.equal('my super description updated') |
672 | expect(videoUpdated.tags).to.deep.equal([ 'tagup1', 'tagup2' ]) | 682 | expect(videoUpdated.tags).to.deep.equal([ 'tagup1', 'tagup2' ]) |
673 | expect(miscsUtils.dateIsValid(videoUpdated.updatedAt, 20000)).to.be.true | 683 | expect(miscsUtils.dateIsValid(videoUpdated.updatedAt, 20000)).to.be.true |