aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/follows.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/follows.ts')
-rw-r--r--server/tests/api/check-params/follows.ts84
1 files changed, 43 insertions, 41 deletions
diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts
index a215e7b1a..0af1562f5 100644
--- a/server/tests/api/check-params/follows.ts
+++ b/server/tests/api/check-params/follows.ts
@@ -166,47 +166,49 @@ describe('Test server follows API validators', function () {
166 }) 166 })
167 167
168 describe('When removing following', function () { 168 describe('When removing following', function () {
169 // it('Should fail with an invalid token', async function () { 169 const path = '/api/v1/server/following'
170 // await request(server.url) 170
171 // .delete(path + '/1') 171 it('Should fail with an invalid token', async function () {
172 // .set('Authorization', 'Bearer faketoken') 172 await request(server.url)
173 // .set('Accept', 'application/json') 173 .delete(path + '/1')
174 // .expect(401) 174 .set('Authorization', 'Bearer faketoken')
175 // }) 175 .set('Accept', 'application/json')
176 // 176 .expect(401)
177 // it('Should fail if the user is not an administrator', async function () { 177 })
178 // await request(server.url) 178
179 // .delete(path + '/1') 179 it('Should fail if the user is not an administrator', async function () {
180 // .set('Authorization', 'Bearer ' + userAccessToken) 180 await request(server.url)
181 // .set('Accept', 'application/json') 181 .delete(path + '/1')
182 // .expect(403) 182 .set('Authorization', 'Bearer ' + userAccessToken)
183 // }) 183 .set('Accept', 'application/json')
184 // 184 .expect(403)
185 // it('Should fail with an undefined id', async function () { 185 })
186 // await request(server.url) 186
187 // .delete(path + '/' + undefined) 187 it('Should fail with an undefined id', async function () {
188 // .set('Authorization', 'Bearer ' + server.accessToken) 188 await request(server.url)
189 // .set('Accept', 'application/json') 189 .delete(path + '/' + undefined)
190 // .expect(400) 190 .set('Authorization', 'Bearer ' + server.accessToken)
191 // }) 191 .set('Accept', 'application/json')
192 // 192 .expect(400)
193 // it('Should fail with an invalid id', async function () { 193 })
194 // await request(server.url) 194
195 // .delete(path + '/foobar') 195 it('Should fail with an invalid id', async function () {
196 // .set('Authorization', 'Bearer ' + server.accessToken) 196 await request(server.url)
197 // .set('Accept', 'application/json') 197 .delete(path + '/foobar')
198 // .expect(400) 198 .set('Authorization', 'Bearer ' + server.accessToken)
199 // }) 199 .set('Accept', 'application/json')
200 // 200 .expect(400)
201 // it('Should fail we do not follow this server', async function () { 201 })
202 // await request(server.url) 202
203 // .delete(path + '/-1') 203 it('Should fail we do not follow this server', async function () {
204 // .set('Authorization', 'Bearer ' + server.accessToken) 204 await request(server.url)
205 // .set('Accept', 'application/json') 205 .delete(path + '/-1')
206 // .expect(404) 206 .set('Authorization', 'Bearer ' + server.accessToken)
207 // }) 207 .set('Accept', 'application/json')
208 // 208 .expect(404)
209 // it('Should succeed with the correct parameters') 209 })
210
211 it('Should succeed with the correct parameters')
210 }) 212 })
211 }) 213 })
212 214