From 8c9c1942f6b5675cfca802e2f707bef3c217afbf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 18 Mar 2016 16:44:54 +0100 Subject: Change name of fields for add video api --- server/tests/api/checkParams.js | 16 ++++++++-------- server/tests/api/utils.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/checkParams.js b/server/tests/api/checkParams.js index b31b0e894..dcc190e97 100644 --- a/server/tests/api/checkParams.js +++ b/server/tests/api/checkParams.js @@ -137,7 +137,7 @@ describe('Test parameters validator', function () { description: 'my super description' } const attach = { - 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') + 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') } makePostRequest(path, data, attach, done) }) @@ -148,7 +148,7 @@ describe('Test parameters validator', function () { description: 'my super description' } const attach = { - 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') + 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') } makePostRequest(path, data, attach, done) }) @@ -158,7 +158,7 @@ describe('Test parameters validator', function () { name: 'my super name' } const attach = { - 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') + 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') } makePostRequest(path, data, attach, done) }) @@ -171,7 +171,7 @@ describe('Test parameters validator', function () { 'very very very very very very very very very very very very very very very long' } const attach = { - 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') + 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') } makePostRequest(path, data, attach, done) }) @@ -191,7 +191,7 @@ describe('Test parameters validator', function () { description: 'my super description' } const attach = { - 'input_video': pathUtils.join(__dirname, '..', 'fixtures', 'video_short_fake.webm') + 'videofile': pathUtils.join(__dirname, '..', 'fixtures', 'video_short_fake.webm') } makePostRequest(path, data, attach, done) }) @@ -202,12 +202,12 @@ describe('Test parameters validator', function () { description: 'my super description' } const attach = { - 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') + 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') } makePostRequest(path, data, attach, function () { - attach.input_video = pathUtils.join(__dirname, 'fixtures', 'video_short.mp4') + attach.videofile = pathUtils.join(__dirname, 'fixtures', 'video_short.mp4') makePostRequest(path, data, attach, function () { - attach.input_video = pathUtils.join(__dirname, 'fixtures', 'video_short.ogv') + attach.videofile = pathUtils.join(__dirname, 'fixtures', 'video_short.ogv') makePostRequest(path, data, attach, done, true) }, true) }, true) diff --git a/server/tests/api/utils.js b/server/tests/api/utils.js index ea0982e81..1b2f61059 100644 --- a/server/tests/api/utils.js +++ b/server/tests/api/utils.js @@ -185,7 +185,7 @@ function uploadVideo (url, name, description, fixture, end) { .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) } -- cgit v1.2.3