aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/checkParams.js16
-rw-r--r--server/tests/api/utils.js2
2 files changed, 9 insertions, 9 deletions
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 () {
137 description: 'my super description' 137 description: 'my super description'
138 } 138 }
139 const attach = { 139 const attach = {
140 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') 140 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
141 } 141 }
142 makePostRequest(path, data, attach, done) 142 makePostRequest(path, data, attach, done)
143 }) 143 })
@@ -148,7 +148,7 @@ describe('Test parameters validator', function () {
148 description: 'my super description' 148 description: 'my super description'
149 } 149 }
150 const attach = { 150 const attach = {
151 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') 151 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
152 } 152 }
153 makePostRequest(path, data, attach, done) 153 makePostRequest(path, data, attach, done)
154 }) 154 })
@@ -158,7 +158,7 @@ describe('Test parameters validator', function () {
158 name: 'my super name' 158 name: 'my super name'
159 } 159 }
160 const attach = { 160 const attach = {
161 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') 161 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
162 } 162 }
163 makePostRequest(path, data, attach, done) 163 makePostRequest(path, data, attach, done)
164 }) 164 })
@@ -171,7 +171,7 @@ describe('Test parameters validator', function () {
171 'very very very very very very very very very very very very very very very long' 171 'very very very very very very very very very very very very very very very long'
172 } 172 }
173 const attach = { 173 const attach = {
174 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') 174 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
175 } 175 }
176 makePostRequest(path, data, attach, done) 176 makePostRequest(path, data, attach, done)
177 }) 177 })
@@ -191,7 +191,7 @@ describe('Test parameters validator', function () {
191 description: 'my super description' 191 description: 'my super description'
192 } 192 }
193 const attach = { 193 const attach = {
194 'input_video': pathUtils.join(__dirname, '..', 'fixtures', 'video_short_fake.webm') 194 'videofile': pathUtils.join(__dirname, '..', 'fixtures', 'video_short_fake.webm')
195 } 195 }
196 makePostRequest(path, data, attach, done) 196 makePostRequest(path, data, attach, done)
197 }) 197 })
@@ -202,12 +202,12 @@ describe('Test parameters validator', function () {
202 description: 'my super description' 202 description: 'my super description'
203 } 203 }
204 const attach = { 204 const attach = {
205 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm') 205 'videofile': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
206 } 206 }
207 makePostRequest(path, data, attach, function () { 207 makePostRequest(path, data, attach, function () {
208 attach.input_video = pathUtils.join(__dirname, 'fixtures', 'video_short.mp4') 208 attach.videofile = pathUtils.join(__dirname, 'fixtures', 'video_short.mp4')
209 makePostRequest(path, data, attach, function () { 209 makePostRequest(path, data, attach, function () {
210 attach.input_video = pathUtils.join(__dirname, 'fixtures', 'video_short.ogv') 210 attach.videofile = pathUtils.join(__dirname, 'fixtures', 'video_short.ogv')
211 makePostRequest(path, data, attach, done, true) 211 makePostRequest(path, data, attach, done, true)
212 }, true) 212 }, true)
213 }, true) 213 }, 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) {
185 .set('Accept', 'application/json') 185 .set('Accept', 'application/json')
186 .field('name', name) 186 .field('name', name)
187 .field('description', description) 187 .field('description', description)
188 .attach('input_video', pathUtils.join(__dirname, 'fixtures', fixture)) 188 .attach('videofile', pathUtils.join(__dirname, 'fixtures', fixture))
189 .expect(204) 189 .expect(204)
190 .end(end) 190 .end(end)
191} 191}