aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/single-server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/single-server.ts')
-rw-r--r--server/tests/api/videos/single-server.ts287
1 files changed, 125 insertions, 162 deletions
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index 1058a1e9c..29dac6ec1 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -2,43 +2,26 @@
2 2
3import 'mocha' 3import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { keyBy } from 'lodash'
6
7import { 5import {
8 checkVideoFilesWereRemoved, 6 checkVideoFilesWereRemoved,
9 cleanupTests, 7 cleanupTests,
10 completeVideoCheck, 8 completeVideoCheck,
11 flushAndRunServer, 9 createSingleServer,
12 getVideo, 10 PeerTubeServer,
13 getVideoCategories,
14 getVideoLanguages,
15 getVideoLicences,
16 getVideoPrivacies,
17 getVideosList,
18 getVideosListPagination,
19 getVideosListSort,
20 getVideosWithFilters,
21 rateVideo,
22 removeVideo,
23 ServerInfo,
24 setAccessTokensToServers, 11 setAccessTokensToServers,
25 testImage, 12 testImage,
26 updateVideo,
27 uploadVideo,
28 viewVideo,
29 wait 13 wait
30} from '../../../../shared/extra-utils' 14} from '@shared/extra-utils'
31import { VideoPrivacy } from '../../../../shared/models/videos' 15import { Video, VideoPrivacy } from '@shared/models'
32import { HttpStatusCode } from '@shared/core-utils'
33 16
34const expect = chai.expect 17const expect = chai.expect
35 18
36describe('Test a single server', function () { 19describe('Test a single server', function () {
37 20
38 function runSuite (mode: 'legacy' | 'resumable') { 21 function runSuite (mode: 'legacy' | 'resumable') {
39 let server: ServerInfo = null 22 let server: PeerTubeServer = null
40 let videoId = -1 23 let videoId: number | string
41 let videoId2 = -1 24 let videoId2: string
42 let videoUUID = '' 25 let videoUUID = ''
43 let videosListBase: any[] = null 26 let videosListBase: any[] = null
44 27
@@ -111,134 +94,123 @@ describe('Test a single server', function () {
111 before(async function () { 94 before(async function () {
112 this.timeout(30000) 95 this.timeout(30000)
113 96
114 server = await flushAndRunServer(1) 97 server = await createSingleServer(1)
115 98
116 await setAccessTokensToServers([ server ]) 99 await setAccessTokensToServers([ server ])
117 }) 100 })
118 101
119 it('Should list video categories', async function () { 102 it('Should list video categories', async function () {
120 const res = await getVideoCategories(server.url) 103 const categories = await server.videos.getCategories()
121
122 const categories = res.body
123 expect(Object.keys(categories)).to.have.length.above(10) 104 expect(Object.keys(categories)).to.have.length.above(10)
124 105
125 expect(categories[11]).to.equal('News & Politics') 106 expect(categories[11]).to.equal('News & Politics')
126 }) 107 })
127 108
128 it('Should list video licences', async function () { 109 it('Should list video licences', async function () {
129 const res = await getVideoLicences(server.url) 110 const licences = await server.videos.getLicences()
130
131 const licences = res.body
132 expect(Object.keys(licences)).to.have.length.above(5) 111 expect(Object.keys(licences)).to.have.length.above(5)
133 112
134 expect(licences[3]).to.equal('Attribution - No Derivatives') 113 expect(licences[3]).to.equal('Attribution - No Derivatives')
135 }) 114 })
136 115
137 it('Should list video languages', async function () { 116 it('Should list video languages', async function () {
138 const res = await getVideoLanguages(server.url) 117 const languages = await server.videos.getLanguages()
139
140 const languages = res.body
141 expect(Object.keys(languages)).to.have.length.above(5) 118 expect(Object.keys(languages)).to.have.length.above(5)
142 119
143 expect(languages['ru']).to.equal('Russian') 120 expect(languages['ru']).to.equal('Russian')
144 }) 121 })
145 122
146 it('Should list video privacies', async function () { 123 it('Should list video privacies', async function () {
147 const res = await getVideoPrivacies(server.url) 124 const privacies = await server.videos.getPrivacies()
148
149 const privacies = res.body
150 expect(Object.keys(privacies)).to.have.length.at.least(3) 125 expect(Object.keys(privacies)).to.have.length.at.least(3)
151 126
152 expect(privacies[3]).to.equal('Private') 127 expect(privacies[3]).to.equal('Private')
153 }) 128 })
154 129
155 it('Should not have videos', async function () { 130 it('Should not have videos', async function () {
156 const res = await getVideosList(server.url) 131 const { data, total } = await server.videos.list()
157 132
158 expect(res.body.total).to.equal(0) 133 expect(total).to.equal(0)
159 expect(res.body.data).to.be.an('array') 134 expect(data).to.be.an('array')
160 expect(res.body.data.length).to.equal(0) 135 expect(data.length).to.equal(0)
161 }) 136 })
162 137
163 it('Should upload the video', async function () { 138 it('Should upload the video', async function () {
164 this.timeout(10000) 139 this.timeout(10000)
165 140
166 const videoAttributes = { 141 const attributes = {
167 name: 'my super name', 142 name: 'my super name',
168 category: 2, 143 category: 2,
169 nsfw: true, 144 nsfw: true,
170 licence: 6, 145 licence: 6,
171 tags: [ 'tag1', 'tag2', 'tag3' ] 146 tags: [ 'tag1', 'tag2', 'tag3' ]
172 } 147 }
173 const res = await uploadVideo(server.url, server.accessToken, videoAttributes, HttpStatusCode.OK_200, mode) 148 const video = await server.videos.upload({ attributes, mode })
174 expect(res.body.video).to.not.be.undefined 149 expect(video).to.not.be.undefined
175 expect(res.body.video.id).to.equal(1) 150 expect(video.id).to.equal(1)
176 expect(res.body.video.uuid).to.have.length.above(5) 151 expect(video.uuid).to.have.length.above(5)
177 152
178 videoId = res.body.video.id 153 videoId = video.id
179 videoUUID = res.body.video.uuid 154 videoUUID = video.uuid
180 }) 155 })
181 156
182 it('Should get and seed the uploaded video', async function () { 157 it('Should get and seed the uploaded video', async function () {
183 this.timeout(5000) 158 this.timeout(5000)
184 159
185 const res = await getVideosList(server.url) 160 const { data, total } = await server.videos.list()
186 161
187 expect(res.body.total).to.equal(1) 162 expect(total).to.equal(1)
188 expect(res.body.data).to.be.an('array') 163 expect(data).to.be.an('array')
189 expect(res.body.data.length).to.equal(1) 164 expect(data.length).to.equal(1)
190 165
191 const video = res.body.data[0] 166 const video = data[0]
192 await completeVideoCheck(server.url, video, getCheckAttributes()) 167 await completeVideoCheck(server, video, getCheckAttributes())
193 }) 168 })
194 169
195 it('Should get the video by UUID', async function () { 170 it('Should get the video by UUID', async function () {
196 this.timeout(5000) 171 this.timeout(5000)
197 172
198 const res = await getVideo(server.url, videoUUID) 173 const video = await server.videos.get({ id: videoUUID })
199 174 await completeVideoCheck(server, video, getCheckAttributes())
200 const video = res.body
201 await completeVideoCheck(server.url, video, getCheckAttributes())
202 }) 175 })
203 176
204 it('Should have the views updated', async function () { 177 it('Should have the views updated', async function () {
205 this.timeout(20000) 178 this.timeout(20000)
206 179
207 await viewVideo(server.url, videoId) 180 await server.videos.view({ id: videoId })
208 await viewVideo(server.url, videoId) 181 await server.videos.view({ id: videoId })
209 await viewVideo(server.url, videoId) 182 await server.videos.view({ id: videoId })
210 183
211 await wait(1500) 184 await wait(1500)
212 185
213 await viewVideo(server.url, videoId) 186 await server.videos.view({ id: videoId })
214 await viewVideo(server.url, videoId) 187 await server.videos.view({ id: videoId })
215 188
216 await wait(1500) 189 await wait(1500)
217 190
218 await viewVideo(server.url, videoId) 191 await server.videos.view({ id: videoId })
219 await viewVideo(server.url, videoId) 192 await server.videos.view({ id: videoId })
220 193
221 // Wait the repeatable job 194 // Wait the repeatable job
222 await wait(8000) 195 await wait(8000)
223 196
224 const res = await getVideo(server.url, videoId) 197 const video = await server.videos.get({ id: videoId })
225
226 const video = res.body
227 expect(video.views).to.equal(3) 198 expect(video.views).to.equal(3)
228 }) 199 })
229 200
230 it('Should remove the video', async function () { 201 it('Should remove the video', async function () {
231 await removeVideo(server.url, server.accessToken, videoId) 202 const video = await server.videos.get({ id: videoId })
203 await server.videos.remove({ id: videoId })
232 204
233 await checkVideoFilesWereRemoved(videoUUID, 1) 205 await checkVideoFilesWereRemoved({ video, server })
234 }) 206 })
235 207
236 it('Should not have videos', async function () { 208 it('Should not have videos', async function () {
237 const res = await getVideosList(server.url) 209 const { total, data } = await server.videos.list()
238 210
239 expect(res.body.total).to.equal(0) 211 expect(total).to.equal(0)
240 expect(res.body.data).to.be.an('array') 212 expect(data).to.be.an('array')
241 expect(res.body.data).to.have.lengthOf(0) 213 expect(data).to.have.lengthOf(0)
242 }) 214 })
243 215
244 it('Should upload 6 videos', async function () { 216 it('Should upload 6 videos', async function () {
@@ -250,7 +222,7 @@ describe('Test a single server', function () {
250 ]) 222 ])
251 223
252 for (const video of videos) { 224 for (const video of videos) {
253 const videoAttributes = { 225 const attributes = {
254 name: video + ' name', 226 name: video + ' name',
255 description: video + ' description', 227 description: video + ' description',
256 category: 2, 228 category: 2,
@@ -261,19 +233,20 @@ describe('Test a single server', function () {
261 fixture: video 233 fixture: video
262 } 234 }
263 235
264 await uploadVideo(server.url, server.accessToken, videoAttributes, HttpStatusCode.OK_200, mode) 236 await server.videos.upload({ attributes, mode })
265 } 237 }
266 }) 238 })
267 239
268 it('Should have the correct durations', async function () { 240 it('Should have the correct durations', async function () {
269 const res = await getVideosList(server.url) 241 const { total, data } = await server.videos.list()
242
243 expect(total).to.equal(6)
244 expect(data).to.be.an('array')
245 expect(data).to.have.lengthOf(6)
270 246
271 expect(res.body.total).to.equal(6) 247 const videosByName: { [ name: string ]: Video } = {}
272 const videos = res.body.data 248 data.forEach(v => { videosByName[v.name] = v })
273 expect(videos).to.be.an('array')
274 expect(videos).to.have.lengthOf(6)
275 249
276 const videosByName = keyBy<{ duration: number }>(videos, 'name')
277 expect(videosByName['video_short.mp4 name'].duration).to.equal(5) 250 expect(videosByName['video_short.mp4 name'].duration).to.equal(5)
278 expect(videosByName['video_short.ogv name'].duration).to.equal(5) 251 expect(videosByName['video_short.ogv name'].duration).to.equal(5)
279 expect(videosByName['video_short.webm name'].duration).to.equal(5) 252 expect(videosByName['video_short.webm name'].duration).to.equal(5)
@@ -283,96 +256,87 @@ describe('Test a single server', function () {
283 }) 256 })
284 257
285 it('Should have the correct thumbnails', async function () { 258 it('Should have the correct thumbnails', async function () {
286 const res = await getVideosList(server.url) 259 const { data } = await server.videos.list()
287 260
288 const videos = res.body.data
289 // For the next test 261 // For the next test
290 videosListBase = videos 262 videosListBase = data
291 263
292 for (const video of videos) { 264 for (const video of data) {
293 const videoName = video.name.replace(' name', '') 265 const videoName = video.name.replace(' name', '')
294 await testImage(server.url, videoName, video.thumbnailPath) 266 await testImage(server.url, videoName, video.thumbnailPath)
295 } 267 }
296 }) 268 })
297 269
298 it('Should list only the two first videos', async function () { 270 it('Should list only the two first videos', async function () {
299 const res = await getVideosListPagination(server.url, 0, 2, 'name') 271 const { total, data } = await server.videos.list({ start: 0, count: 2, sort: 'name' })
300 272
301 const videos = res.body.data 273 expect(total).to.equal(6)
302 expect(res.body.total).to.equal(6) 274 expect(data.length).to.equal(2)
303 expect(videos.length).to.equal(2) 275 expect(data[0].name).to.equal(videosListBase[0].name)
304 expect(videos[0].name).to.equal(videosListBase[0].name) 276 expect(data[1].name).to.equal(videosListBase[1].name)
305 expect(videos[1].name).to.equal(videosListBase[1].name)
306 }) 277 })
307 278
308 it('Should list only the next three videos', async function () { 279 it('Should list only the next three videos', async function () {
309 const res = await getVideosListPagination(server.url, 2, 3, 'name') 280 const { total, data } = await server.videos.list({ start: 2, count: 3, sort: 'name' })
310 281
311 const videos = res.body.data 282 expect(total).to.equal(6)
312 expect(res.body.total).to.equal(6) 283 expect(data.length).to.equal(3)
313 expect(videos.length).to.equal(3) 284 expect(data[0].name).to.equal(videosListBase[2].name)
314 expect(videos[0].name).to.equal(videosListBase[2].name) 285 expect(data[1].name).to.equal(videosListBase[3].name)
315 expect(videos[1].name).to.equal(videosListBase[3].name) 286 expect(data[2].name).to.equal(videosListBase[4].name)
316 expect(videos[2].name).to.equal(videosListBase[4].name)
317 }) 287 })
318 288
319 it('Should list the last video', async function () { 289 it('Should list the last video', async function () {
320 const res = await getVideosListPagination(server.url, 5, 6, 'name') 290 const { total, data } = await server.videos.list({ start: 5, count: 6, sort: 'name' })
321 291
322 const videos = res.body.data 292 expect(total).to.equal(6)
323 expect(res.body.total).to.equal(6) 293 expect(data.length).to.equal(1)
324 expect(videos.length).to.equal(1) 294 expect(data[0].name).to.equal(videosListBase[5].name)
325 expect(videos[0].name).to.equal(videosListBase[5].name)
326 }) 295 })
327 296
328 it('Should not have the total field', async function () { 297 it('Should not have the total field', async function () {
329 const res = await getVideosListPagination(server.url, 5, 6, 'name', true) 298 const { total, data } = await server.videos.list({ start: 5, count: 6, sort: 'name', skipCount: true })
330 299
331 const videos = res.body.data 300 expect(total).to.not.exist
332 expect(res.body.total).to.not.exist 301 expect(data.length).to.equal(1)
333 expect(videos.length).to.equal(1) 302 expect(data[0].name).to.equal(videosListBase[5].name)
334 expect(videos[0].name).to.equal(videosListBase[5].name)
335 }) 303 })
336 304
337 it('Should list and sort by name in descending order', async function () { 305 it('Should list and sort by name in descending order', async function () {
338 const res = await getVideosListSort(server.url, '-name') 306 const { total, data } = await server.videos.list({ sort: '-name' })
339 307
340 const videos = res.body.data 308 expect(total).to.equal(6)
341 expect(res.body.total).to.equal(6) 309 expect(data.length).to.equal(6)
342 expect(videos.length).to.equal(6) 310 expect(data[0].name).to.equal('video_short.webm name')
343 expect(videos[0].name).to.equal('video_short.webm name') 311 expect(data[1].name).to.equal('video_short.ogv name')
344 expect(videos[1].name).to.equal('video_short.ogv name') 312 expect(data[2].name).to.equal('video_short.mp4 name')
345 expect(videos[2].name).to.equal('video_short.mp4 name') 313 expect(data[3].name).to.equal('video_short3.webm name')
346 expect(videos[3].name).to.equal('video_short3.webm name') 314 expect(data[4].name).to.equal('video_short2.webm name')
347 expect(videos[4].name).to.equal('video_short2.webm name') 315 expect(data[5].name).to.equal('video_short1.webm name')
348 expect(videos[5].name).to.equal('video_short1.webm name')
349 316
350 videoId = videos[3].uuid 317 videoId = data[3].uuid
351 videoId2 = videos[5].uuid 318 videoId2 = data[5].uuid
352 }) 319 })
353 320
354 it('Should list and sort by trending in descending order', async function () { 321 it('Should list and sort by trending in descending order', async function () {
355 const res = await getVideosListPagination(server.url, 0, 2, '-trending') 322 const { total, data } = await server.videos.list({ start: 0, count: 2, sort: '-trending' })
356 323
357 const videos = res.body.data 324 expect(total).to.equal(6)
358 expect(res.body.total).to.equal(6) 325 expect(data.length).to.equal(2)
359 expect(videos.length).to.equal(2)
360 }) 326 })
361 327
362 it('Should list and sort by hotness in descending order', async function () { 328 it('Should list and sort by hotness in descending order', async function () {
363 const res = await getVideosListPagination(server.url, 0, 2, '-hot') 329 const { total, data } = await server.videos.list({ start: 0, count: 2, sort: '-hot' })
364 330
365 const videos = res.body.data 331 expect(total).to.equal(6)
366 expect(res.body.total).to.equal(6) 332 expect(data.length).to.equal(2)
367 expect(videos.length).to.equal(2)
368 }) 333 })
369 334
370 it('Should list and sort by best in descending order', async function () { 335 it('Should list and sort by best in descending order', async function () {
371 const res = await getVideosListPagination(server.url, 0, 2, '-best') 336 const { total, data } = await server.videos.list({ start: 0, count: 2, sort: '-best' })
372 337
373 const videos = res.body.data 338 expect(total).to.equal(6)
374 expect(res.body.total).to.equal(6) 339 expect(data.length).to.equal(2)
375 expect(videos.length).to.equal(2)
376 }) 340 })
377 341
378 it('Should update a video', async function () { 342 it('Should update a video', async function () {
@@ -387,67 +351,66 @@ describe('Test a single server', function () {
387 downloadEnabled: false, 351 downloadEnabled: false,
388 tags: [ 'tagup1', 'tagup2' ] 352 tags: [ 'tagup1', 'tagup2' ]
389 } 353 }
390 await updateVideo(server.url, server.accessToken, videoId, attributes) 354 await server.videos.update({ id: videoId, attributes })
391 }) 355 })
392 356
393 it('Should filter by tags and category', async function () { 357 it('Should filter by tags and category', async function () {
394 const res1 = await getVideosWithFilters(server.url, { tagsAllOf: [ 'tagup1', 'tagup2' ], categoryOneOf: [ 4 ] }) 358 {
395 expect(res1.body.total).to.equal(1) 359 const { data, total } = await server.videos.list({ tagsAllOf: [ 'tagup1', 'tagup2' ], categoryOneOf: [ 4 ] })
396 expect(res1.body.data[0].name).to.equal('my super video updated') 360 expect(total).to.equal(1)
361 expect(data[0].name).to.equal('my super video updated')
362 }
397 363
398 const res2 = await getVideosWithFilters(server.url, { tagsAllOf: [ 'tagup1', 'tagup2' ], categoryOneOf: [ 3 ] }) 364 {
399 expect(res2.body.total).to.equal(0) 365 const { total } = await server.videos.list({ tagsAllOf: [ 'tagup1', 'tagup2' ], categoryOneOf: [ 3 ] })
366 expect(total).to.equal(0)
367 }
400 }) 368 })
401 369
402 it('Should have the video updated', async function () { 370 it('Should have the video updated', async function () {
403 this.timeout(60000) 371 this.timeout(60000)
404 372
405 const res = await getVideo(server.url, videoId) 373 const video = await server.videos.get({ id: videoId })
406 const video = res.body
407 374
408 await completeVideoCheck(server.url, video, updateCheckAttributes()) 375 await completeVideoCheck(server, video, updateCheckAttributes())
409 }) 376 })
410 377
411 it('Should update only the tags of a video', async function () { 378 it('Should update only the tags of a video', async function () {
412 const attributes = { 379 const attributes = {
413 tags: [ 'supertag', 'tag1', 'tag2' ] 380 tags: [ 'supertag', 'tag1', 'tag2' ]
414 } 381 }
415 await updateVideo(server.url, server.accessToken, videoId, attributes) 382 await server.videos.update({ id: videoId, attributes })
416 383
417 const res = await getVideo(server.url, videoId) 384 const video = await server.videos.get({ id: videoId })
418 const video = res.body
419 385
420 await completeVideoCheck(server.url, video, Object.assign(updateCheckAttributes(), attributes)) 386 await completeVideoCheck(server, video, Object.assign(updateCheckAttributes(), attributes))
421 }) 387 })
422 388
423 it('Should update only the description of a video', async function () { 389 it('Should update only the description of a video', async function () {
424 const attributes = { 390 const attributes = {
425 description: 'hello everybody' 391 description: 'hello everybody'
426 } 392 }
427 await updateVideo(server.url, server.accessToken, videoId, attributes) 393 await server.videos.update({ id: videoId, attributes })
428 394
429 const res = await getVideo(server.url, videoId) 395 const video = await server.videos.get({ id: videoId })
430 const video = res.body
431 396
432 const expectedAttributes = Object.assign(updateCheckAttributes(), { tags: [ 'supertag', 'tag1', 'tag2' ] }, attributes) 397 const expectedAttributes = Object.assign(updateCheckAttributes(), { tags: [ 'supertag', 'tag1', 'tag2' ] }, attributes)
433 await completeVideoCheck(server.url, video, expectedAttributes) 398 await completeVideoCheck(server, video, expectedAttributes)
434 }) 399 })
435 400
436 it('Should like a video', async function () { 401 it('Should like a video', async function () {
437 await rateVideo(server.url, server.accessToken, videoId, 'like') 402 await server.videos.rate({ id: videoId, rating: 'like' })
438 403
439 const res = await getVideo(server.url, videoId) 404 const video = await server.videos.get({ id: videoId })
440 const video = res.body
441 405
442 expect(video.likes).to.equal(1) 406 expect(video.likes).to.equal(1)
443 expect(video.dislikes).to.equal(0) 407 expect(video.dislikes).to.equal(0)
444 }) 408 })
445 409
446 it('Should dislike the same video', async function () { 410 it('Should dislike the same video', async function () {
447 await rateVideo(server.url, server.accessToken, videoId, 'dislike') 411 await server.videos.rate({ id: videoId, rating: 'dislike' })
448 412
449 const res = await getVideo(server.url, videoId) 413 const video = await server.videos.get({ id: videoId })
450 const video = res.body
451 414
452 expect(video.likes).to.equal(0) 415 expect(video.likes).to.equal(0)
453 expect(video.dislikes).to.equal(1) 416 expect(video.dislikes).to.equal(1)
@@ -457,10 +420,10 @@ describe('Test a single server', function () {
457 { 420 {
458 const now = new Date() 421 const now = new Date()
459 const attributes = { originallyPublishedAt: now.toISOString() } 422 const attributes = { originallyPublishedAt: now.toISOString() }
460 await updateVideo(server.url, server.accessToken, videoId, attributes) 423 await server.videos.update({ id: videoId, attributes })
461 424
462 const res = await getVideosListSort(server.url, '-originallyPublishedAt') 425 const { data } = await server.videos.list({ sort: '-originallyPublishedAt' })
463 const names = res.body.data.map(v => v.name) 426 const names = data.map(v => v.name)
464 427
465 expect(names[0]).to.equal('my super video updated') 428 expect(names[0]).to.equal('my super video updated')
466 expect(names[1]).to.equal('video_short2.webm name') 429 expect(names[1]).to.equal('video_short2.webm name')
@@ -473,10 +436,10 @@ describe('Test a single server', function () {
473 { 436 {
474 const now = new Date() 437 const now = new Date()
475 const attributes = { originallyPublishedAt: now.toISOString() } 438 const attributes = { originallyPublishedAt: now.toISOString() }
476 await updateVideo(server.url, server.accessToken, videoId2, attributes) 439 await server.videos.update({ id: videoId2, attributes })
477 440
478 const res = await getVideosListSort(server.url, '-originallyPublishedAt') 441 const { data } = await server.videos.list({ sort: '-originallyPublishedAt' })
479 const names = res.body.data.map(v => v.name) 442 const names = data.map(v => v.name)
480 443
481 expect(names[0]).to.equal('video_short1.webm name') 444 expect(names[0]).to.equal('video_short1.webm name')
482 expect(names[1]).to.equal('my super video updated') 445 expect(names[1]).to.equal('my super video updated')