diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-09-07 21:22:17 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-09-07 21:22:17 +0200 |
commit | aa2e7f1501ce108e0c250538aba7046fddefc935 (patch) | |
tree | c1ef2d2f4b75bcacb54a4ac396bd668ec3b7168d /server/tests/api/check-params/pods.ts | |
parent | 337c258e77b28bb39e61b7b88cbdaa18363b9461 (diff) | |
download | PeerTube-aa2e7f1501ce108e0c250538aba7046fddefc935.tar.gz PeerTube-aa2e7f1501ce108e0c250538aba7046fddefc935.tar.zst PeerTube-aa2e7f1501ce108e0c250538aba7046fddefc935.zip |
urls: makefriends/quitfriends -> make-friends/quit-friends
Diffstat (limited to 'server/tests/api/check-params/pods.ts')
-rw-r--r-- | server/tests/api/check-params/pods.ts | 20 |
1 files changed, 10 insertions, 10 deletions
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 () { | |||
49 | 49 | ||
50 | it('Should fail without hosts', async function () { | 50 | it('Should fail without hosts', async function () { |
51 | await request(server.url) | 51 | await request(server.url) |
52 | .post(path + '/makefriends') | 52 | .post(path + '/make-friends') |
53 | .set('Authorization', 'Bearer ' + server.accessToken) | 53 | .set('Authorization', 'Bearer ' + server.accessToken) |
54 | .set('Accept', 'application/json') | 54 | .set('Accept', 'application/json') |
55 | .expect(400) | 55 | .expect(400) |
@@ -57,7 +57,7 @@ describe('Test pods API validators', function () { | |||
57 | 57 | ||
58 | it('Should fail if hosts is not an array', async function () { | 58 | it('Should fail if hosts is not an array', async function () { |
59 | await request(server.url) | 59 | await request(server.url) |
60 | .post(path + '/makefriends') | 60 | .post(path + '/make-friends') |
61 | .send({ hosts: 'localhost:9002' }) | 61 | .send({ hosts: 'localhost:9002' }) |
62 | .set('Authorization', 'Bearer ' + server.accessToken) | 62 | .set('Authorization', 'Bearer ' + server.accessToken) |
63 | .set('Accept', 'application/json') | 63 | .set('Accept', 'application/json') |
@@ -66,7 +66,7 @@ describe('Test pods API validators', function () { | |||
66 | 66 | ||
67 | it('Should fail if the array is not composed by hosts', async function () { | 67 | it('Should fail if the array is not composed by hosts', async function () { |
68 | await request(server.url) | 68 | await request(server.url) |
69 | .post(path + '/makefriends') | 69 | .post(path + '/make-friends') |
70 | .send({ hosts: [ 'localhost:9002', 'localhost:coucou' ] }) | 70 | .send({ hosts: [ 'localhost:9002', 'localhost:coucou' ] }) |
71 | .set('Authorization', 'Bearer ' + server.accessToken) | 71 | .set('Authorization', 'Bearer ' + server.accessToken) |
72 | .set('Accept', 'application/json') | 72 | .set('Accept', 'application/json') |
@@ -75,7 +75,7 @@ describe('Test pods API validators', function () { | |||
75 | 75 | ||
76 | it('Should fail if the array is composed with http schemes', async function () { | 76 | it('Should fail if the array is composed with http schemes', async function () { |
77 | await request(server.url) | 77 | await request(server.url) |
78 | .post(path + '/makefriends') | 78 | .post(path + '/make-friends') |
79 | .send({ hosts: [ 'localhost:9002', 'http://localhost:9003' ] }) | 79 | .send({ hosts: [ 'localhost:9002', 'http://localhost:9003' ] }) |
80 | .set('Authorization', 'Bearer ' + server.accessToken) | 80 | .set('Authorization', 'Bearer ' + server.accessToken) |
81 | .set('Accept', 'application/json') | 81 | .set('Accept', 'application/json') |
@@ -84,7 +84,7 @@ describe('Test pods API validators', function () { | |||
84 | 84 | ||
85 | it('Should fail if hosts are not unique', async function () { | 85 | it('Should fail if hosts are not unique', async function () { |
86 | await request(server.url) | 86 | await request(server.url) |
87 | .post(path + '/makefriends') | 87 | .post(path + '/make-friends') |
88 | .send({ urls: [ 'localhost:9002', 'localhost:9002' ] }) | 88 | .send({ urls: [ 'localhost:9002', 'localhost:9002' ] }) |
89 | .set('Authorization', 'Bearer ' + server.accessToken) | 89 | .set('Authorization', 'Bearer ' + server.accessToken) |
90 | .set('Accept', 'application/json') | 90 | .set('Accept', 'application/json') |
@@ -93,16 +93,16 @@ describe('Test pods API validators', function () { | |||
93 | 93 | ||
94 | it('Should fail with an invalid token', async function () { | 94 | it('Should fail with an invalid token', async function () { |
95 | await request(server.url) | 95 | await request(server.url) |
96 | .post(path + '/makefriends') | 96 | .post(path + '/make-friends') |
97 | .send(body) | 97 | .send(body) |
98 | .set('Authorization', 'Bearer faketoken') | 98 | .set('Authorization', 'Bearer fake_token') |
99 | .set('Accept', 'application/json') | 99 | .set('Accept', 'application/json') |
100 | .expect(401) | 100 | .expect(401) |
101 | }) | 101 | }) |
102 | 102 | ||
103 | it('Should fail if the user is not an administrator', async function () { | 103 | it('Should fail if the user is not an administrator', async function () { |
104 | await request(server.url) | 104 | await request(server.url) |
105 | .post(path + '/makefriends') | 105 | .post(path + '/make-friends') |
106 | .send(body) | 106 | .send(body) |
107 | .set('Authorization', 'Bearer ' + userAccessToken) | 107 | .set('Authorization', 'Bearer ' + userAccessToken) |
108 | .set('Accept', 'application/json') | 108 | .set('Accept', 'application/json') |
@@ -113,7 +113,7 @@ describe('Test pods API validators', function () { | |||
113 | describe('When quitting friends', function () { | 113 | describe('When quitting friends', function () { |
114 | it('Should fail with an invalid token', async function () { | 114 | it('Should fail with an invalid token', async function () { |
115 | await request(server.url) | 115 | await request(server.url) |
116 | .get(path + '/quitfriends') | 116 | .get(path + '/quit-friends') |
117 | .query({ start: 'hello' }) | 117 | .query({ start: 'hello' }) |
118 | .set('Authorization', 'Bearer faketoken') | 118 | .set('Authorization', 'Bearer faketoken') |
119 | .set('Accept', 'application/json') | 119 | .set('Accept', 'application/json') |
@@ -122,7 +122,7 @@ describe('Test pods API validators', function () { | |||
122 | 122 | ||
123 | it('Should fail if the user is not an administrator', async function () { | 123 | it('Should fail if the user is not an administrator', async function () { |
124 | await request(server.url) | 124 | await request(server.url) |
125 | .get(path + '/quitfriends') | 125 | .get(path + '/quit-friends') |
126 | .query({ start: 'hello' }) | 126 | .query({ start: 'hello' }) |
127 | .set('Authorization', 'Bearer ' + userAccessToken) | 127 | .set('Authorization', 'Bearer ' + userAccessToken) |
128 | .set('Accept', 'application/json') | 128 | .set('Accept', 'application/json') |