aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/checkParams.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/api/checkParams.js')
-rw-r--r--tests/api/checkParams.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/api/checkParams.js b/tests/api/checkParams.js
index 11fc68ff9..8ce1bd476 100644
--- a/tests/api/checkParams.js
+++ b/tests/api/checkParams.js
@@ -4,6 +4,7 @@
4 var async = require('async') 4 var async = require('async')
5 var chai = require('chai') 5 var chai = require('chai')
6 var expect = chai.expect 6 var expect = chai.expect
7 var pathUtils = require('path')
7 var request = require('supertest') 8 var request = require('supertest')
8 9
9 var utils = require('./utils') 10 var utils = require('./utils')
@@ -119,7 +120,7 @@
119 describe('When searching a video', function () { 120 describe('When searching a video', function () {
120 it('Should fail with nothing', function (done) { 121 it('Should fail with nothing', function (done) {
121 request(url) 122 request(url)
122 .get(path + '/search/') 123 .get(pathUtils.join(path, 'search'))
123 .set('Accept', 'application/json') 124 .set('Accept', 'application/json')
124 .expect(400, done) 125 .expect(400, done)
125 }) 126 })
@@ -137,7 +138,7 @@
137 description: 'my super description' 138 description: 'my super description'
138 } 139 }
139 var attach = { 140 var attach = {
140 'input_video': __dirname + '/fixtures/video_short.webm' 141 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
141 } 142 }
142 makePostRequest(path, data, attach, done) 143 makePostRequest(path, data, attach, done)
143 }) 144 })
@@ -148,7 +149,7 @@
148 description: 'my super description' 149 description: 'my super description'
149 } 150 }
150 var attach = { 151 var attach = {
151 'input_video': __dirname + '/fixtures/video_short.webm' 152 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
152 } 153 }
153 makePostRequest(path, data, attach, done) 154 makePostRequest(path, data, attach, done)
154 }) 155 })
@@ -158,7 +159,7 @@
158 name: 'my super name' 159 name: 'my super name'
159 } 160 }
160 var attach = { 161 var attach = {
161 'input_video': __dirname + '/fixtures/video_short.webm' 162 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
162 } 163 }
163 makePostRequest(path, data, attach, done) 164 makePostRequest(path, data, attach, done)
164 }) 165 })
@@ -171,7 +172,7 @@
171 'very very very very very very very very very very very very very very very long' 172 'very very very very very very very very very very very very very very very long'
172 } 173 }
173 var attach = { 174 var attach = {
174 'input_video': __dirname + '/fixtures/video_short.webm' 175 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
175 } 176 }
176 makePostRequest(path, data, attach, done) 177 makePostRequest(path, data, attach, done)
177 }) 178 })
@@ -191,7 +192,7 @@
191 description: 'my super description' 192 description: 'my super description'
192 } 193 }
193 var attach = { 194 var attach = {
194 'input_video': __dirname + '/../fixtures/video_short_fake.webm' 195 'input_video': pathUtils.join(__dirname, '..', 'fixtures', 'video_short_fake.webm')
195 } 196 }
196 makePostRequest(path, data, attach, done) 197 makePostRequest(path, data, attach, done)
197 }) 198 })
@@ -202,12 +203,12 @@
202 description: 'my super description' 203 description: 'my super description'
203 } 204 }
204 var attach = { 205 var attach = {
205 'input_video': __dirname + '/fixtures/video_short.webm' 206 'input_video': pathUtils.join(__dirname, 'fixtures', 'video_short.webm')
206 } 207 }
207 makePostRequest(path, data, attach, function () { 208 makePostRequest(path, data, attach, function () {
208 attach.input_video = __dirname + '/fixtures/video_short.mp4' 209 attach.input_video = pathUtils.join(__dirname, 'fixtures', 'video_short.mp4')
209 makePostRequest(path, data, attach, function () { 210 makePostRequest(path, data, attach, function () {
210 attach.input_video = __dirname + '/fixtures/video_short.ogv' 211 attach.input_video = pathUtils.join(__dirname, 'fixtures', 'video_short.ogv')
211 makePostRequest(path, data, attach, done, true) 212 makePostRequest(path, data, attach, done, true)
212 }, true) 213 }, true)
213 }, true) 214 }, true)