X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fvideo-imports.ts;h=85382b261e5a04061936e65435a05b0d15cc46da;hb=fd3c2e87051f5029cdec39d877b576a62f48e219;hp=4439810e82cef7d75cf574f34a94a26fb130bced;hpb=ba2684ceddf9b76312635b9cddc6bf6975ce436a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index 4439810e8..85382b261 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts @@ -59,6 +59,15 @@ describe('Test video imports API validator', function () { await checkBadSortPagination(server.url, myPath, server.accessToken) }) + it('Should fail with a bad videoChannelSyncId param', async function () { + await makeGetRequest({ + url: server.url, + path: myPath, + query: { videoChannelSyncId: 'toto' }, + token: server.accessToken + }) + }) + it('Should success with the correct parameters', async function () { await makeGetRequest({ url: server.url, path: myPath, expectedStatus: HttpStatusCode.OK_200, token: server.accessToken }) }) @@ -88,7 +97,13 @@ describe('Test video imports API validator', function () { it('Should fail with nothing', async function () { const fields = {} - await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) + await makePostBodyRequest({ + url: server.url, + path, + token: server.accessToken, + fields, + expectedStatus: HttpStatusCode.BAD_REQUEST_400 + }) }) it('Should fail without a target url', async function () {