aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/utils.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-03-18 16:28:09 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-03-18 16:28:09 +0100
commit2df82d42cb57783cd90ccfc11fc8ffe4b95ebb70 (patch)
tree9c177f135a121ee34ed2e4f529dd2cacc3ad3f87 /server/tests/api/utils.js
parentf0f5567b6918fc60c8cab15e13aec03a89a91dfb (diff)
downloadPeerTube-2df82d42cb57783cd90ccfc11fc8ffe4b95ebb70.tar.gz
PeerTube-2df82d42cb57783cd90ccfc11fc8ffe4b95ebb70.tar.zst
PeerTube-2df82d42cb57783cd90ccfc11fc8ffe4b95ebb70.zip
Change api output for videos
Diffstat (limited to 'server/tests/api/utils.js')
-rw-r--r--server/tests/api/utils.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tests/api/utils.js b/server/tests/api/utils.js
index 05142085f..ea0982e81 100644
--- a/server/tests/api/utils.js
+++ b/server/tests/api/utils.js
@@ -9,6 +9,7 @@ const request = require('supertest')
9const testUtils = { 9const testUtils = {
10 flushTests: flushTests, 10 flushTests: flushTests,
11 getFriendsList: getFriendsList, 11 getFriendsList: getFriendsList,
12 getVideo: getVideo,
12 getVideosList: getVideosList, 13 getVideosList: getVideosList,
13 makeFriends: makeFriends, 14 makeFriends: makeFriends,
14 quitFriends: quitFriends, 15 quitFriends: quitFriends,
@@ -36,6 +37,17 @@ function getFriendsList (url, end) {
36 .end(end) 37 .end(end)
37} 38}
38 39
40function getVideo (url, id, end) {
41 const path = '/api/v1/videos/' + id
42
43 request(url)
44 .get(path)
45 .set('Accept', 'application/json')
46 .expect(200)
47 .expect('Content-Type', /json/)
48 .end(end)
49}
50
39function getVideosList (url, end) { 51function getVideosList (url, end) {
40 const path = '/api/v1/videos' 52 const path = '/api/v1/videos'
41 53