aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/single-pod.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/single-pod.js')
-rw-r--r--server/tests/api/single-pod.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/server/tests/api/single-pod.js b/server/tests/api/single-pod.js
index aff6d56ec..fe388698f 100644
--- a/server/tests/api/single-pod.js
+++ b/server/tests/api/single-pod.js
@@ -70,6 +70,19 @@ describe('Test a single pod', function () {
70 }) 70 })
71 }) 71 })
72 72
73 it('Should list video languages', function (done) {
74 videosUtils.getVideoLanguages(server.url, function (err, res) {
75 if (err) throw err
76
77 const languages = res.body
78 expect(Object.keys(languages)).to.have.length.above(5)
79
80 expect(languages[3]).to.equal('Mandarin')
81
82 done()
83 })
84 })
85
73 it('Should not have videos', function (done) { 86 it('Should not have videos', function (done) {
74 videosUtils.getVideosList(server.url, function (err, res) { 87 videosUtils.getVideosList(server.url, function (err, res) {
75 if (err) throw err 88 if (err) throw err
@@ -110,6 +123,8 @@ describe('Test a single pod', function () {
110 expect(video.categoryLabel).to.equal('Films') 123 expect(video.categoryLabel).to.equal('Films')
111 expect(video.licence).to.equal(6) 124 expect(video.licence).to.equal(6)
112 expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives') 125 expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
126 expect(video.language).to.equal(3)
127 expect(video.languageLabel).to.equal('Mandarin')
113 expect(video.nsfw).to.be.truthy 128 expect(video.nsfw).to.be.truthy
114 expect(video.description).to.equal('my super description') 129 expect(video.description).to.equal('my super description')
115 expect(video.podHost).to.equal('localhost:9001') 130 expect(video.podHost).to.equal('localhost:9001')
@@ -150,6 +165,8 @@ describe('Test a single pod', function () {
150 expect(video.categoryLabel).to.equal('Films') 165 expect(video.categoryLabel).to.equal('Films')
151 expect(video.licence).to.equal(6) 166 expect(video.licence).to.equal(6)
152 expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives') 167 expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
168 expect(video.language).to.equal(3)
169 expect(video.languageLabel).to.equal('Mandarin')
153 expect(video.nsfw).to.be.truthy 170 expect(video.nsfw).to.be.truthy
154 expect(video.description).to.equal('my super description') 171 expect(video.description).to.equal('my super description')
155 expect(video.podHost).to.equal('localhost:9001') 172 expect(video.podHost).to.equal('localhost:9001')
@@ -194,6 +211,8 @@ describe('Test a single pod', function () {
194 expect(video.categoryLabel).to.equal('Films') 211 expect(video.categoryLabel).to.equal('Films')
195 expect(video.licence).to.equal(6) 212 expect(video.licence).to.equal(6)
196 expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives') 213 expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
214 expect(video.language).to.equal(3)
215 expect(video.languageLabel).to.equal('Mandarin')
197 expect(video.nsfw).to.be.truthy 216 expect(video.nsfw).to.be.truthy
198 expect(video.description).to.equal('my super description') 217 expect(video.description).to.equal('my super description')
199 expect(video.podHost).to.equal('localhost:9001') 218 expect(video.podHost).to.equal('localhost:9001')
@@ -254,6 +273,8 @@ describe('Test a single pod', function () {
254 expect(video.categoryLabel).to.equal('Films') 273 expect(video.categoryLabel).to.equal('Films')
255 expect(video.licence).to.equal(6) 274 expect(video.licence).to.equal(6)
256 expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives') 275 expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
276 expect(video.language).to.equal(3)
277 expect(video.languageLabel).to.equal('Mandarin')
257 expect(video.nsfw).to.be.truthy 278 expect(video.nsfw).to.be.truthy
258 expect(video.description).to.equal('my super description') 279 expect(video.description).to.equal('my super description')
259 expect(video.podHost).to.equal('localhost:9001') 280 expect(video.podHost).to.equal('localhost:9001')
@@ -352,6 +373,7 @@ describe('Test a single pod', function () {
352 description: video + ' description', 373 description: video + ' description',
353 category: 2, 374 category: 2,
354 licence: 1, 375 licence: 1,
376 language: 1,
355 nsfw: true, 377 nsfw: true,
356 tags: [ 'tag1', 'tag2', 'tag3' ], 378 tags: [ 'tag1', 'tag2', 'tag3' ],
357 fixture: video 379 fixture: video
@@ -578,6 +600,7 @@ describe('Test a single pod', function () {
578 name: 'my super video updated', 600 name: 'my super video updated',
579 category: 4, 601 category: 4,
580 licence: 2, 602 licence: 2,
603 language: 5,
581 nsfw: false, 604 nsfw: false,
582 description: 'my super description updated', 605 description: 'my super description updated',
583 tags: [ 'tagup1', 'tagup2' ] 606 tags: [ 'tagup1', 'tagup2' ]
@@ -598,6 +621,8 @@ describe('Test a single pod', function () {
598 expect(video.categoryLabel).to.equal('Art') 621 expect(video.categoryLabel).to.equal('Art')
599 expect(video.licence).to.equal(2) 622 expect(video.licence).to.equal(2)
600 expect(video.licenceLabel).to.equal('Attribution - Share Alike') 623 expect(video.licenceLabel).to.equal('Attribution - Share Alike')
624 expect(video.language).to.equal(5)
625 expect(video.languageLabel).to.equal('Arabic')
601 expect(video.nsfw).to.be.truthy 626 expect(video.nsfw).to.be.truthy
602 expect(video.description).to.equal('my super description updated') 627 expect(video.description).to.equal('my super description updated')
603 expect(video.podHost).to.equal('localhost:9001') 628 expect(video.podHost).to.equal('localhost:9001')
@@ -640,6 +665,8 @@ describe('Test a single pod', function () {
640 expect(video.categoryLabel).to.equal('Art') 665 expect(video.categoryLabel).to.equal('Art')
641 expect(video.licence).to.equal(2) 666 expect(video.licence).to.equal(2)
642 expect(video.licenceLabel).to.equal('Attribution - Share Alike') 667 expect(video.licenceLabel).to.equal('Attribution - Share Alike')
668 expect(video.language).to.equal(5)
669 expect(video.languageLabel).to.equal('Arabic')
643 expect(video.nsfw).to.be.truthy 670 expect(video.nsfw).to.be.truthy
644 expect(video.description).to.equal('my super description updated') 671 expect(video.description).to.equal('my super description updated')
645 expect(video.podHost).to.equal('localhost:9001') 672 expect(video.podHost).to.equal('localhost:9001')
@@ -672,6 +699,8 @@ describe('Test a single pod', function () {
672 expect(video.categoryLabel).to.equal('Art') 699 expect(video.categoryLabel).to.equal('Art')
673 expect(video.licence).to.equal(2) 700 expect(video.licence).to.equal(2)
674 expect(video.licenceLabel).to.equal('Attribution - Share Alike') 701 expect(video.licenceLabel).to.equal('Attribution - Share Alike')
702 expect(video.language).to.equal(5)
703 expect(video.languageLabel).to.equal('Arabic')
675 expect(video.nsfw).to.be.truthy 704 expect(video.nsfw).to.be.truthy
676 expect(video.description).to.equal('hello everybody') 705 expect(video.description).to.equal('hello everybody')
677 expect(video.podHost).to.equal('localhost:9001') 706 expect(video.podHost).to.equal('localhost:9001')