const testUtils = {
flushTests: flushTests,
getFriendsList: getFriendsList,
+ getVideo: getVideo,
getVideosList: getVideosList,
makeFriends: makeFriends,
quitFriends: quitFriends,
.end(end)
}
+function getVideo (url, id, end) {
+ const path = '/api/v1/videos/' + id
+
+ request(url)
+ .get(path)
+ .set('Accept', 'application/json')
+ .expect(200)
+ .expect('Content-Type', /json/)
+ .end(end)
+}
+
function getVideosList (url, end) {
const path = '/api/v1/videos'
.set('Accept', 'application/json')
.field('name', name)
.field('description', description)
- .attach('input_video', pathUtils.join(__dirname, 'fixtures', fixture))
+ .attach('videofile', pathUtils.join(__dirname, 'fixtures', fixture))
.expect(204)
.end(end)
}