X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fplugins.ts;h=cf80b35c297e6217c43b02b95df4c6291c677cec;hb=818c449b3c34e9f324ac744120c8774e724ab25e;hp=83ce6f4517bf25fdc4439c7aa5981ac7be6b1e34;hpb=09071200c73f5358e1d0bfb61a274e4f2c4ec52b;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/plugins.ts b/server/tests/api/check-params/plugins.ts index 83ce6f451..cf80b35c2 100644 --- a/server/tests/api/check-params/plugins.ts +++ b/server/tests/api/check-params/plugins.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-unused-expression */ +/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import 'mocha' @@ -281,7 +281,7 @@ describe('Test server plugins API validators', function () { }) }) - describe('When getting a plugin or the registered settings', function () { + describe('When getting a plugin or the registered settings or public settings', function () { const path = '/api/v1/plugins/' it('Should fail with an invalid token', async function () { @@ -307,7 +307,7 @@ describe('Test server plugins API validators', function () { }) it('Should fail with an invalid npm name', async function () { - for (const suffix of [ 'toto', 'toto/registered-settings' ]) { + for (const suffix of [ 'toto', 'toto/registered-settings', 'toto/public-settings' ]) { await makeGetRequest({ url: server.url, path: path + suffix, @@ -316,7 +316,7 @@ describe('Test server plugins API validators', function () { }) } - for (const suffix of [ 'peertube-plugin-TOTO', 'peertube-plugin-TOTO/registered-settings' ]) { + for (const suffix of [ 'peertube-plugin-TOTO', 'peertube-plugin-TOTO/registered-settings', 'peertube-plugin-TOTO/public-settings' ]) { await makeGetRequest({ url: server.url, path: path + suffix, @@ -327,7 +327,7 @@ describe('Test server plugins API validators', function () { }) it('Should fail with an unknown plugin', async function () { - for (const suffix of [ 'peertube-plugin-toto', 'peertube-plugin-toto/registered-settings' ]) { + for (const suffix of [ 'peertube-plugin-toto', 'peertube-plugin-toto/registered-settings', 'peertube-plugin-toto/public-settings' ]) { await makeGetRequest({ url: server.url, path: path + suffix, @@ -338,7 +338,7 @@ describe('Test server plugins API validators', function () { }) it('Should succeed with the correct parameters', async function () { - for (const suffix of [ npmPlugin, `${npmPlugin}/registered-settings` ]) { + for (const suffix of [ npmPlugin, `${npmPlugin}/registered-settings`, `${npmPlugin}/public-settings` ]) { await makeGetRequest({ url: server.url, path: path + suffix,