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/video-abuse.js | |
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/video-abuse.js')
-rw-r--r-- | server/tests/api/video-abuse.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/server/tests/api/video-abuse.js b/server/tests/api/video-abuse.js index 871054788..7db067585 100644 --- a/server/tests/api/video-abuse.js +++ b/server/tests/api/video-abuse.js | |||
@@ -45,20 +45,18 @@ describe('Test video abuses', function () { | |||
45 | }, | 45 | }, |
46 | // Upload some videos on each pods | 46 | // Upload some videos on each pods |
47 | function (next) { | 47 | function (next) { |
48 | const name = 'my super name for pod 1' | 48 | const videoAttributes = { |
49 | const category = 5 | 49 | name: 'my super name for pod 1', |
50 | const description = 'my super description for pod 1' | 50 | description: 'my super description for pod 1' |
51 | const tags = [ 'tag' ] | 51 | } |
52 | const file = 'video_short2.webm' | 52 | videosUtils.uploadVideo(servers[0].url, servers[0].accessToken, videoAttributes, next) |
53 | videosUtils.uploadVideo(servers[0].url, servers[0].accessToken, name, category, description, tags, file, next) | ||
54 | }, | 53 | }, |
55 | function (next) { | 54 | function (next) { |
56 | const name = 'my super name for pod 2' | 55 | const videoAttributes = { |
57 | const category = 5 | 56 | name: 'my super name for pod 2', |
58 | const description = 'my super description for pod 2' | 57 | description: 'my super description for pod 2' |
59 | const tags = [ 'tag' ] | 58 | } |
60 | const file = 'video_short2.webm' | 59 | videosUtils.uploadVideo(servers[1].url, servers[1].accessToken, videoAttributes, next) |
61 | videosUtils.uploadVideo(servers[1].url, servers[1].accessToken, name, category, description, tags, file, next) | ||
62 | }, | 60 | }, |
63 | // Wait videos propagation | 61 | // Wait videos propagation |
64 | function (next) { | 62 | function (next) { |