aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/checkParams.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-09 21:44:45 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-09 21:44:45 +0200
commit68a3b9f2aacb0225ae8b883b561b144bac339cbd (patch)
treee3d75b7952073ba4b2ef4b62ed57ded9f3cf0f1e /server/tests/api/checkParams.js
parent45b81debd6d6647980da7ad5a984bafa37cb79ea (diff)
downloadPeerTube-68a3b9f2aacb0225ae8b883b561b144bac339cbd.tar.gz
PeerTube-68a3b9f2aacb0225ae8b883b561b144bac339cbd.tar.zst
PeerTube-68a3b9f2aacb0225ae8b883b561b144bac339cbd.zip
Server: delete user with the id and not the username
Diffstat (limited to 'server/tests/api/checkParams.js')
-rw-r--r--server/tests/api/checkParams.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/api/checkParams.js b/server/tests/api/checkParams.js
index 128b07c4a..882948fac 100644
--- a/server/tests/api/checkParams.js
+++ b/server/tests/api/checkParams.js
@@ -610,23 +610,23 @@ describe('Test parameters validator', function () {
610 }) 610 })
611 611
612 describe('When removing an user', function () { 612 describe('When removing an user', function () {
613 it('Should fail with an incorrect username', function (done) { 613 it('Should fail with an incorrect id', function (done) {
614 request(server.url) 614 request(server.url)
615 .delete(path + 'bla-bla') 615 .delete(path + 'bla-bla')
616 .set('Authorization', 'Bearer ' + server.accessToken) 616 .set('Authorization', 'Bearer ' + server.accessToken)
617 .expect(400, done) 617 .expect(400, done)
618 }) 618 })
619 619
620 it('Should return 404 with a non existing username', function (done) { 620 it('Should return 404 with a non existing id', function (done) {
621 request(server.url) 621 request(server.url)
622 .delete(path + 'qzzerg') 622 .delete(path + '579f982228c99c221d8092b8')
623 .set('Authorization', 'Bearer ' + server.accessToken) 623 .set('Authorization', 'Bearer ' + server.accessToken)
624 .expect(404, done) 624 .expect(404, done)
625 }) 625 })
626 626
627 it('Should success with the correct parameters', function (done) { 627 it('Should success with the correct parameters', function (done) {
628 request(server.url) 628 request(server.url)
629 .delete(path + 'user1') 629 .delete(path + userId)
630 .set('Authorization', 'Bearer ' + server.accessToken) 630 .set('Authorization', 'Bearer ' + server.accessToken)
631 .expect(204, done) 631 .expect(204, done)
632 }) 632 })