From aa2e7f1501ce108e0c250538aba7046fddefc935 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 7 Sep 2017 21:22:17 +0200 Subject: urls: makefriends/quitfriends -> make-friends/quit-friends --- server/tests/api/check-params/pods.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'server/tests/api/check-params') diff --git a/server/tests/api/check-params/pods.ts b/server/tests/api/check-params/pods.ts index 27c080931..a897e4dcd 100644 --- a/server/tests/api/check-params/pods.ts +++ b/server/tests/api/check-params/pods.ts @@ -49,7 +49,7 @@ describe('Test pods API validators', function () { it('Should fail without hosts', async function () { await request(server.url) - .post(path + '/makefriends') + .post(path + '/make-friends') .set('Authorization', 'Bearer ' + server.accessToken) .set('Accept', 'application/json') .expect(400) @@ -57,7 +57,7 @@ describe('Test pods API validators', function () { it('Should fail if hosts is not an array', async function () { await request(server.url) - .post(path + '/makefriends') + .post(path + '/make-friends') .send({ hosts: 'localhost:9002' }) .set('Authorization', 'Bearer ' + server.accessToken) .set('Accept', 'application/json') @@ -66,7 +66,7 @@ describe('Test pods API validators', function () { it('Should fail if the array is not composed by hosts', async function () { await request(server.url) - .post(path + '/makefriends') + .post(path + '/make-friends') .send({ hosts: [ 'localhost:9002', 'localhost:coucou' ] }) .set('Authorization', 'Bearer ' + server.accessToken) .set('Accept', 'application/json') @@ -75,7 +75,7 @@ describe('Test pods API validators', function () { it('Should fail if the array is composed with http schemes', async function () { await request(server.url) - .post(path + '/makefriends') + .post(path + '/make-friends') .send({ hosts: [ 'localhost:9002', 'http://localhost:9003' ] }) .set('Authorization', 'Bearer ' + server.accessToken) .set('Accept', 'application/json') @@ -84,7 +84,7 @@ describe('Test pods API validators', function () { it('Should fail if hosts are not unique', async function () { await request(server.url) - .post(path + '/makefriends') + .post(path + '/make-friends') .send({ urls: [ 'localhost:9002', 'localhost:9002' ] }) .set('Authorization', 'Bearer ' + server.accessToken) .set('Accept', 'application/json') @@ -93,16 +93,16 @@ describe('Test pods API validators', function () { it('Should fail with an invalid token', async function () { await request(server.url) - .post(path + '/makefriends') + .post(path + '/make-friends') .send(body) - .set('Authorization', 'Bearer faketoken') + .set('Authorization', 'Bearer fake_token') .set('Accept', 'application/json') .expect(401) }) it('Should fail if the user is not an administrator', async function () { await request(server.url) - .post(path + '/makefriends') + .post(path + '/make-friends') .send(body) .set('Authorization', 'Bearer ' + userAccessToken) .set('Accept', 'application/json') @@ -113,7 +113,7 @@ describe('Test pods API validators', function () { describe('When quitting friends', function () { it('Should fail with an invalid token', async function () { await request(server.url) - .get(path + '/quitfriends') + .get(path + '/quit-friends') .query({ start: 'hello' }) .set('Authorization', 'Bearer faketoken') .set('Accept', 'application/json') @@ -122,7 +122,7 @@ describe('Test pods API validators', function () { it('Should fail if the user is not an administrator', async function () { await request(server.url) - .get(path + '/quitfriends') + .get(path + '/quit-friends') .query({ start: 'hello' }) .set('Authorization', 'Bearer ' + userAccessToken) .set('Accept', 'application/json') -- cgit v1.2.3