diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 10:42:24 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea (patch) | |
tree | baf29753ac5d4598643e3bee719f8df0cc36c59d /server/tests/api/check-params/video-imports.ts | |
parent | 08642a765ea514a00f159db898edf14c376fbe6c (diff) | |
download | PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.gz PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.zst PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.zip |
Refactor requests
Diffstat (limited to 'server/tests/api/check-params/video-imports.ts')
-rw-r--r-- | server/tests/api/check-params/video-imports.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index 0209275ac..957556c9b 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { omit } from 'lodash' | 4 | import { omit } from 'lodash' |
5 | import { HttpStatusCode } from '@shared/core-utils' | 5 | import { HttpStatusCode } from '@shared/models' |
6 | import { | 6 | import { |
7 | buildAbsoluteFixturePath, | 7 | buildAbsoluteFixturePath, |
8 | checkBadCountPagination, | 8 | checkBadCountPagination, |
@@ -61,7 +61,7 @@ describe('Test video imports API validator', function () { | |||
61 | }) | 61 | }) |
62 | 62 | ||
63 | it('Should success with the correct parameters', async function () { | 63 | it('Should success with the correct parameters', async function () { |
64 | await makeGetRequest({ url: server.url, path: myPath, statusCodeExpected: HttpStatusCode.OK_200, token: server.accessToken }) | 64 | await makeGetRequest({ url: server.url, path: myPath, expectedStatus: HttpStatusCode.OK_200, token: server.accessToken }) |
65 | }) | 65 | }) |
66 | }) | 66 | }) |
67 | 67 | ||
@@ -99,7 +99,7 @@ describe('Test video imports API validator', function () { | |||
99 | path, | 99 | path, |
100 | token: server.accessToken, | 100 | token: server.accessToken, |
101 | fields, | 101 | fields, |
102 | statusCodeExpected: HttpStatusCode.BAD_REQUEST_400 | 102 | expectedStatus: HttpStatusCode.BAD_REQUEST_400 |
103 | }) | 103 | }) |
104 | }) | 104 | }) |
105 | 105 | ||
@@ -251,7 +251,7 @@ describe('Test video imports API validator', function () { | |||
251 | path, | 251 | path, |
252 | token: server.accessToken, | 252 | token: server.accessToken, |
253 | fields: baseCorrectParams, | 253 | fields: baseCorrectParams, |
254 | statusCodeExpected: HttpStatusCode.OK_200 | 254 | expectedStatus: HttpStatusCode.OK_200 |
255 | }) | 255 | }) |
256 | }) | 256 | }) |
257 | 257 | ||
@@ -276,7 +276,7 @@ describe('Test video imports API validator', function () { | |||
276 | path, | 276 | path, |
277 | token: server.accessToken, | 277 | token: server.accessToken, |
278 | fields: baseCorrectParams, | 278 | fields: baseCorrectParams, |
279 | statusCodeExpected: HttpStatusCode.CONFLICT_409 | 279 | expectedStatus: HttpStatusCode.CONFLICT_409 |
280 | }) | 280 | }) |
281 | }) | 281 | }) |
282 | 282 | ||
@@ -304,7 +304,7 @@ describe('Test video imports API validator', function () { | |||
304 | path, | 304 | path, |
305 | token: server.accessToken, | 305 | token: server.accessToken, |
306 | fields, | 306 | fields, |
307 | statusCodeExpected: HttpStatusCode.CONFLICT_409 | 307 | expectedStatus: HttpStatusCode.CONFLICT_409 |
308 | }) | 308 | }) |
309 | 309 | ||
310 | fields = omit(fields, 'magnetUri') | 310 | fields = omit(fields, 'magnetUri') |
@@ -318,7 +318,7 @@ describe('Test video imports API validator', function () { | |||
318 | token: server.accessToken, | 318 | token: server.accessToken, |
319 | fields, | 319 | fields, |
320 | attaches, | 320 | attaches, |
321 | statusCodeExpected: HttpStatusCode.CONFLICT_409 | 321 | expectedStatus: HttpStatusCode.CONFLICT_409 |
322 | }) | 322 | }) |
323 | }) | 323 | }) |
324 | }) | 324 | }) |