diff options
Diffstat (limited to 'server/tests/api/singlePod.js')
-rw-r--r-- | server/tests/api/singlePod.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/server/tests/api/singlePod.js b/server/tests/api/singlePod.js index 296dd0aa4..ef882b080 100644 --- a/server/tests/api/singlePod.js +++ b/server/tests/api/singlePod.js | |||
@@ -57,7 +57,11 @@ describe('Test a single pod', function () { | |||
57 | 57 | ||
58 | it('Should upload the video', function (done) { | 58 | it('Should upload the video', function (done) { |
59 | this.timeout(5000) | 59 | this.timeout(5000) |
60 | utils.uploadVideo(server.url, server.accessToken, 'my super name', 'my super description', 'video_short.webm', done) | 60 | const name = 'my super name' |
61 | const description = 'my super description' | ||
62 | const tags = [ 'tag1', 'tag2', 'tag3' ] | ||
63 | const file = 'video_short.webm' | ||
64 | utils.uploadVideo(server.url, server.accessToken, name, description, tags, file, done) | ||
61 | }) | 65 | }) |
62 | 66 | ||
63 | it('Should seed the uploaded video', function (done) { | 67 | it('Should seed the uploaded video', function (done) { |
@@ -78,6 +82,7 @@ describe('Test a single pod', function () { | |||
78 | expect(video.magnetUri).to.exist | 82 | expect(video.magnetUri).to.exist |
79 | expect(video.author).to.equal('root') | 83 | expect(video.author).to.equal('root') |
80 | expect(video.isLocal).to.be.true | 84 | expect(video.isLocal).to.be.true |
85 | expect(video.tags).to.deep.equal([ 'tag1', 'tag2', 'tag3' ]) | ||
81 | expect(utils.dateIsValid(video.createdDate)).to.be.true | 86 | expect(utils.dateIsValid(video.createdDate)).to.be.true |
82 | 87 | ||
83 | utils.testImage(server.url, 'video_short.webm', video.thumbnailPath, function (err, test) { | 88 | utils.testImage(server.url, 'video_short.webm', video.thumbnailPath, function (err, test) { |
@@ -112,6 +117,7 @@ describe('Test a single pod', function () { | |||
112 | expect(video.magnetUri).to.exist | 117 | expect(video.magnetUri).to.exist |
113 | expect(video.author).to.equal('root') | 118 | expect(video.author).to.equal('root') |
114 | expect(video.isLocal).to.be.true | 119 | expect(video.isLocal).to.be.true |
120 | expect(video.tags).to.deep.equal([ 'tag1', 'tag2', 'tag3' ]) | ||
115 | expect(utils.dateIsValid(video.createdDate)).to.be.true | 121 | expect(utils.dateIsValid(video.createdDate)).to.be.true |
116 | 122 | ||
117 | utils.testImage(server.url, 'video_short.webm', video.thumbnailPath, function (err, test) { | 123 | utils.testImage(server.url, 'video_short.webm', video.thumbnailPath, function (err, test) { |
@@ -143,6 +149,7 @@ describe('Test a single pod', function () { | |||
143 | expect(video.podUrl).to.equal('localhost:9001') | 149 | expect(video.podUrl).to.equal('localhost:9001') |
144 | expect(video.author).to.equal('root') | 150 | expect(video.author).to.equal('root') |
145 | expect(video.isLocal).to.be.true | 151 | expect(video.isLocal).to.be.true |
152 | expect(video.tags).to.deep.equal([ 'tag1', 'tag2', 'tag3' ]) | ||
146 | expect(utils.dateIsValid(video.createdDate)).to.be.true | 153 | expect(utils.dateIsValid(video.createdDate)).to.be.true |
147 | 154 | ||
148 | utils.testImage(server.url, 'video_short.webm', video.thumbnailPath, function (err, test) { | 155 | utils.testImage(server.url, 'video_short.webm', video.thumbnailPath, function (err, test) { |
@@ -168,6 +175,7 @@ describe('Test a single pod', function () { | |||
168 | expect(video.podUrl).to.equal('localhost:9001') | 175 | expect(video.podUrl).to.equal('localhost:9001') |
169 | expect(video.author).to.equal('root') | 176 | expect(video.author).to.equal('root') |
170 | expect(video.isLocal).to.be.true | 177 | expect(video.isLocal).to.be.true |
178 | expect(video.tags).to.deep.equal([ 'tag1', 'tag2', 'tag3' ]) | ||
171 | expect(utils.dateIsValid(video.createdDate)).to.be.true | 179 | expect(utils.dateIsValid(video.createdDate)).to.be.true |
172 | 180 | ||
173 | utils.testImage(server.url, 'video_short.webm', video.thumbnailPath, function (err, test) { | 181 | utils.testImage(server.url, 'video_short.webm', video.thumbnailPath, function (err, test) { |
@@ -235,7 +243,11 @@ describe('Test a single pod', function () { | |||
235 | 'video_short1.webm', 'video_short2.webm', 'video_short3.webm' | 243 | 'video_short1.webm', 'video_short2.webm', 'video_short3.webm' |
236 | ] | 244 | ] |
237 | async.each(videos, function (video, callbackEach) { | 245 | async.each(videos, function (video, callbackEach) { |
238 | utils.uploadVideo(server.url, server.accessToken, video + ' name', video + ' description', video, callbackEach) | 246 | const name = video + ' name' |
247 | const description = video + ' description' | ||
248 | const tags = [ 'tag1', 'tag2', 'tag3' ] | ||
249 | |||
250 | utils.uploadVideo(server.url, server.accessToken, name, description, tags, video, callbackEach) | ||
239 | }, done) | 251 | }, done) |
240 | }) | 252 | }) |
241 | 253 | ||