aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-16 22:31:45 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-16 22:31:45 +0200
commit5c39adb7313e0696aabb4b71196ab7b0b378c359 (patch)
treeac44b67890509338b984f8cbf11660dc77cdd0fd /server/tests/api/check-params.js
parent089ff2f2046fdbaf9531726eea1f8c6726ebf0c0 (diff)
downloadPeerTube-5c39adb7313e0696aabb4b71196ab7b0b378c359.tar.gz
PeerTube-5c39adb7313e0696aabb4b71196ab7b0b378c359.tar.zst
PeerTube-5c39adb7313e0696aabb4b71196ab7b0b378c359.zip
Server: add user list sort/pagination
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 = {