diff options
Diffstat (limited to 'server/tests/api/checkParams.js')
-rw-r--r-- | server/tests/api/checkParams.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/api/checkParams.js b/server/tests/api/checkParams.js index 59ee0bfc3..71113fd39 100644 --- a/server/tests/api/checkParams.js +++ b/server/tests/api/checkParams.js | |||
@@ -12,8 +12,8 @@ describe('Test parameters validator', function () { | |||
12 | let server = null | 12 | let server = null |
13 | 13 | ||
14 | function makePostRequest (path, token, fields, attach, done, fail) { | 14 | function makePostRequest (path, token, fields, attach, done, fail) { |
15 | let status_code = 400 | 15 | let statusCode = 400 |
16 | if (fail !== undefined && fail === false) status_code = 200 | 16 | if (fail !== undefined && fail === false) statusCode = 200 |
17 | 17 | ||
18 | const req = request(server.url) | 18 | const req = request(server.url) |
19 | .post(path) | 19 | .post(path) |
@@ -26,18 +26,18 @@ describe('Test parameters validator', function () { | |||
26 | req.field(field, value) | 26 | req.field(field, value) |
27 | }) | 27 | }) |
28 | 28 | ||
29 | req.expect(status_code, done) | 29 | req.expect(statusCode, done) |
30 | } | 30 | } |
31 | 31 | ||
32 | function makePostBodyRequest (path, fields, done, fail) { | 32 | function makePostBodyRequest (path, fields, done, fail) { |
33 | let status_code = 400 | 33 | let statusCode = 400 |
34 | if (fail !== undefined && fail === false) status_code = 200 | 34 | if (fail !== undefined && fail === false) statusCode = 200 |
35 | 35 | ||
36 | request(server.url) | 36 | request(server.url) |
37 | .post(path) | 37 | .post(path) |
38 | .set('Accept', 'application/json') | 38 | .set('Accept', 'application/json') |
39 | .send(fields) | 39 | .send(fields) |
40 | .expect(status_code, done) | 40 | .expect(statusCode, done) |
41 | } | 41 | } |
42 | 42 | ||
43 | // --------------------------------------------------------------- | 43 | // --------------------------------------------------------------- |