aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/multiple-pods.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-03-27 20:53:11 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-03-27 20:53:11 +0200
commit6f0c39e2de400685b7baf8340b9e132f2659365a (patch)
treeb036c6ebf65ff4cb7f5649fc48a0b7201370bddd /server/tests/api/multiple-pods.js
parent28974889281523eec5b00dd5596c67d99c5167e5 (diff)
downloadPeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.tar.gz
PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.tar.zst
PeerTube-6f0c39e2de400685b7baf8340b9e132f2659365a.zip
Server: add licence video attribute
Diffstat (limited to 'server/tests/api/multiple-pods.js')
-rw-r--r--server/tests/api/multiple-pods.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/server/tests/api/multiple-pods.js b/server/tests/api/multiple-pods.js
index d5c723b3b..69ef38c20 100644
--- a/server/tests/api/multiple-pods.js
+++ b/server/tests/api/multiple-pods.js
@@ -82,6 +82,8 @@ describe('Test multiple pods', function () {
82 function (next) { 82 function (next) {
83 const videoAttributes = { 83 const videoAttributes = {
84 name: 'my super name for pod 1', 84 name: 'my super name for pod 1',
85 category: 5,
86 licence: 4,
85 description: 'my super description for pod 1', 87 description: 'my super description for pod 1',
86 tags: [ 'tag1p1', 'tag2p1' ], 88 tags: [ 'tag1p1', 'tag2p1' ],
87 fixture: 'video_short1.webm' 89 fixture: 'video_short1.webm'
@@ -108,6 +110,8 @@ describe('Test multiple pods', function () {
108 expect(video.name).to.equal('my super name for pod 1') 110 expect(video.name).to.equal('my super name for pod 1')
109 expect(video.category).to.equal(5) 111 expect(video.category).to.equal(5)
110 expect(video.categoryLabel).to.equal('Sports') 112 expect(video.categoryLabel).to.equal('Sports')
113 expect(video.licence).to.equal(4)
114 expect(video.licenceLabel).to.equal('Attribution - Non Commercial')
111 expect(video.description).to.equal('my super description for pod 1') 115 expect(video.description).to.equal('my super description for pod 1')
112 expect(video.podHost).to.equal('localhost:9001') 116 expect(video.podHost).to.equal('localhost:9001')
113 expect(video.magnetUri).to.exist 117 expect(video.magnetUri).to.exist
@@ -150,6 +154,7 @@ describe('Test multiple pods', function () {
150 const videoAttributes = { 154 const videoAttributes = {
151 name: 'my super name for pod 2', 155 name: 'my super name for pod 2',
152 category: 4, 156 category: 4,
157 licence: 3,
153 description: 'my super description for pod 2', 158 description: 'my super description for pod 2',
154 tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ], 159 tags: [ 'tag1p2', 'tag2p2', 'tag3p2' ],
155 fixture: 'video_short2.webm' 160 fixture: 'video_short2.webm'
@@ -176,6 +181,8 @@ describe('Test multiple pods', function () {
176 expect(video.name).to.equal('my super name for pod 2') 181 expect(video.name).to.equal('my super name for pod 2')
177 expect(video.category).to.equal(4) 182 expect(video.category).to.equal(4)
178 expect(video.categoryLabel).to.equal('Art') 183 expect(video.categoryLabel).to.equal('Art')
184 expect(video.licence).to.equal(3)
185 expect(video.licenceLabel).to.equal('Attribution - No Derivatives')
179 expect(video.description).to.equal('my super description for pod 2') 186 expect(video.description).to.equal('my super description for pod 2')
180 expect(video.podHost).to.equal('localhost:9002') 187 expect(video.podHost).to.equal('localhost:9002')
181 expect(video.magnetUri).to.exist 188 expect(video.magnetUri).to.exist
@@ -218,6 +225,7 @@ describe('Test multiple pods', function () {
218 const videoAttributes = { 225 const videoAttributes = {
219 name: 'my super name for pod 3', 226 name: 'my super name for pod 3',
220 category: 6, 227 category: 6,
228 licence: 5,
221 description: 'my super description for pod 3', 229 description: 'my super description for pod 3',
222 tags: [ 'tag1p3' ], 230 tags: [ 'tag1p3' ],
223 fixture: 'video_short3.webm' 231 fixture: 'video_short3.webm'
@@ -228,6 +236,7 @@ describe('Test multiple pods', function () {
228 const videoAttributes = { 236 const videoAttributes = {
229 name: 'my super name for pod 3-2', 237 name: 'my super name for pod 3-2',
230 category: 7, 238 category: 7,
239 licence: 6,
231 description: 'my super description for pod 3-2', 240 description: 'my super description for pod 3-2',
232 tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ], 241 tags: [ 'tag2p3', 'tag3p3', 'tag4p3' ],
233 fixture: 'video_short.webm' 242 fixture: 'video_short.webm'
@@ -264,6 +273,8 @@ describe('Test multiple pods', function () {
264 expect(video1.name).to.equal('my super name for pod 3') 273 expect(video1.name).to.equal('my super name for pod 3')
265 expect(video1.category).to.equal(6) 274 expect(video1.category).to.equal(6)
266 expect(video1.categoryLabel).to.equal('Travels') 275 expect(video1.categoryLabel).to.equal('Travels')
276 expect(video1.licence).to.equal(5)
277 expect(video1.licenceLabel).to.equal('Attribution - Non Commercial - Share Alike')
267 expect(video1.description).to.equal('my super description for pod 3') 278 expect(video1.description).to.equal('my super description for pod 3')
268 expect(video1.podHost).to.equal('localhost:9003') 279 expect(video1.podHost).to.equal('localhost:9003')
269 expect(video1.magnetUri).to.exist 280 expect(video1.magnetUri).to.exist
@@ -276,6 +287,8 @@ describe('Test multiple pods', function () {
276 expect(video2.name).to.equal('my super name for pod 3-2') 287 expect(video2.name).to.equal('my super name for pod 3-2')
277 expect(video2.category).to.equal(7) 288 expect(video2.category).to.equal(7)
278 expect(video2.categoryLabel).to.equal('Gaming') 289 expect(video2.categoryLabel).to.equal('Gaming')
290 expect(video2.licence).to.equal(6)
291 expect(video2.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
279 expect(video2.description).to.equal('my super description for pod 3-2') 292 expect(video2.description).to.equal('my super description for pod 3-2')
280 expect(video2.podHost).to.equal('localhost:9003') 293 expect(video2.podHost).to.equal('localhost:9003')
281 expect(video2.magnetUri).to.exist 294 expect(video2.magnetUri).to.exist
@@ -624,6 +637,7 @@ describe('Test multiple pods', function () {
624 const attributes = { 637 const attributes = {
625 name: 'my super video updated', 638 name: 'my super video updated',
626 category: 10, 639 category: 10,
640 licence: 7,
627 description: 'my super description updated', 641 description: 'my super description updated',
628 tags: [ 'tagup1', 'tagup2' ] 642 tags: [ 'tagup1', 'tagup2' ]
629 } 643 }
@@ -652,6 +666,8 @@ describe('Test multiple pods', function () {
652 expect(!!videoUpdated).to.be.true 666 expect(!!videoUpdated).to.be.true
653 expect(videoUpdated.category).to.equal(10) 667 expect(videoUpdated.category).to.equal(10)
654 expect(videoUpdated.categoryLabel).to.equal('Entertainment') 668 expect(videoUpdated.categoryLabel).to.equal('Entertainment')
669 expect(videoUpdated.licence).to.equal(7)
670 expect(videoUpdated.licenceLabel).to.equal('Public Domain Dedication')
655 expect(videoUpdated.description).to.equal('my super description updated') 671 expect(videoUpdated.description).to.equal('my super description updated')
656 expect(videoUpdated.tags).to.deep.equal([ 'tagup1', 'tagup2' ]) 672 expect(videoUpdated.tags).to.deep.equal([ 'tagup1', 'tagup2' ])
657 expect(miscsUtils.dateIsValid(videoUpdated.updatedAt, 20000)).to.be.true 673 expect(miscsUtils.dateIsValid(videoUpdated.updatedAt, 20000)).to.be.true