diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-03-26 18:39:01 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-03-26 18:39:01 +0200 |
commit | b4c5ac97ffa3e16f837b7e2d72291656eefac812 (patch) | |
tree | bebc031f07e4a4d6cea370690b696f10273d9b47 /server/tests/api/check-params | |
parent | f6e692f5ee2a0e8e1fcb75df1949b354a014ad50 (diff) | |
download | PeerTube-b4c5ac97ffa3e16f837b7e2d72291656eefac812.tar.gz PeerTube-b4c5ac97ffa3e16f837b7e2d72291656eefac812.tar.zst PeerTube-b4c5ac97ffa3e16f837b7e2d72291656eefac812.zip |
Server: refractoring upload/update video test utils
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r-- | server/tests/api/check-params/users.js | 8 | ||||
-rw-r--r-- | server/tests/api/check-params/video-abuses.js | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/server/tests/api/check-params/users.js b/server/tests/api/check-params/users.js index f6fbcf555..b04f9f4a6 100644 --- a/server/tests/api/check-params/users.js +++ b/server/tests/api/check-params/users.js | |||
@@ -50,12 +50,8 @@ describe('Test users API validators', function () { | |||
50 | usersUtils.createUser(server.url, server.accessToken, username, password, next) | 50 | usersUtils.createUser(server.url, server.accessToken, username, password, next) |
51 | }, | 51 | }, |
52 | function (next) { | 52 | function (next) { |
53 | const name = 'my super name for pod' | 53 | const videoAttributes = {} |
54 | const category = 5 | 54 | videosUtils.uploadVideo(server.url, server.accessToken, videoAttributes, next) |
55 | const description = 'my super description for pod' | ||
56 | const tags = [ 'tag' ] | ||
57 | const file = 'video_short2.webm' | ||
58 | videosUtils.uploadVideo(server.url, server.accessToken, name, category, description, tags, file, next) | ||
59 | }, | 55 | }, |
60 | function (next) { | 56 | function (next) { |
61 | videosUtils.getVideosList(server.url, function (err, res) { | 57 | videosUtils.getVideosList(server.url, function (err, res) { |
diff --git a/server/tests/api/check-params/video-abuses.js b/server/tests/api/check-params/video-abuses.js index 061b80be8..6dc5a7090 100644 --- a/server/tests/api/check-params/video-abuses.js +++ b/server/tests/api/check-params/video-abuses.js | |||
@@ -61,12 +61,8 @@ describe('Test video abuses API validators', function () { | |||
61 | }, | 61 | }, |
62 | // Upload some videos on each pods | 62 | // Upload some videos on each pods |
63 | function (next) { | 63 | function (next) { |
64 | const name = 'my super name for pod' | 64 | const videoAttributes = {} |
65 | const category = 2 | 65 | videosUtils.uploadVideo(server.url, server.accessToken, videoAttributes, next) |
66 | const description = 'my super description for pod' | ||
67 | const tags = [ 'tag' ] | ||
68 | const file = 'video_short2.webm' | ||
69 | videosUtils.uploadVideo(server.url, server.accessToken, name, category, description, tags, file, next) | ||
70 | }, | 66 | }, |
71 | function (next) { | 67 | function (next) { |
72 | videosUtils.getVideosList(server.url, function (err, res) { | 68 | videosUtils.getVideosList(server.url, function (err, res) { |