aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params.js')
-rw-r--r--server/tests/api/check-params.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/server/tests/api/check-params.js b/server/tests/api/check-params.js
index 882948fac..fc8b0a42a 100644
--- a/server/tests/api/check-params.js
+++ b/server/tests/api/check-params.js
@@ -459,6 +459,32 @@ describe('Test parameters validator', function () {
459 let userId = null 459 let userId = null
460 let userAccessToken = null 460 let userAccessToken = null
461 461
462 describe('When listing users', function () {
463 it('Should fail with a bad start pagination', function (done) {
464 request(server.url)
465 .get(path)
466 .query({ start: 'hello' })
467 .set('Accept', 'application/json')
468 .expect(400, done)
469 })
470
471 it('Should fail with a bad count pagination', function (done) {
472 request(server.url)
473 .get(path)
474 .query({ count: 'hello' })
475 .set('Accept', 'application/json')
476 .expect(400, done)
477 })
478
479 it('Should fail with an incorrect sort', function (done) {
480 request(server.url)
481 .get(path)
482 .query({ sort: 'hello' })
483 .set('Accept', 'application/json')
484 .expect(400, done)
485 })
486 })
487
462 describe('When adding a new user', function () { 488 describe('When adding a new user', function () {
463 it('Should fail with a too small username', function (done) { 489 it('Should fail with a too small username', function (done) {
464 const data = { 490 const data = {