aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-26 09:35:43 +0200
committerChocobozzz <me@florianbigard.com>2019-07-26 15:18:29 +0200
commitba211e7386bb2f25e37a4c5bcdfeb4237e1cd315 (patch)
tree398bb14a92c7df3765a0a64bac9f4672c5588488 /server/tests/api/check-params
parent23bdacf8ec24ce47a15529830e116911d7478598 (diff)
downloadPeerTube-ba211e7386bb2f25e37a4c5bcdfeb4237e1cd315.tar.gz
PeerTube-ba211e7386bb2f25e37a4c5bcdfeb4237e1cd315.tar.zst
PeerTube-ba211e7386bb2f25e37a4c5bcdfeb4237e1cd315.zip
Add public settings endpoint
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/plugins.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/api/check-params/plugins.ts b/server/tests/api/check-params/plugins.ts
index 83ce6f451..9553bce17 100644
--- a/server/tests/api/check-params/plugins.ts
+++ b/server/tests/api/check-params/plugins.ts
@@ -281,7 +281,7 @@ describe('Test server plugins API validators', function () {
281 }) 281 })
282 }) 282 })
283 283
284 describe('When getting a plugin or the registered settings', function () { 284 describe('When getting a plugin or the registered settings or public settings', function () {
285 const path = '/api/v1/plugins/' 285 const path = '/api/v1/plugins/'
286 286
287 it('Should fail with an invalid token', async function () { 287 it('Should fail with an invalid token', async function () {
@@ -307,7 +307,7 @@ describe('Test server plugins API validators', function () {
307 }) 307 })
308 308
309 it('Should fail with an invalid npm name', async function () { 309 it('Should fail with an invalid npm name', async function () {
310 for (const suffix of [ 'toto', 'toto/registered-settings' ]) { 310 for (const suffix of [ 'toto', 'toto/registered-settings', 'toto/public-settings' ]) {
311 await makeGetRequest({ 311 await makeGetRequest({
312 url: server.url, 312 url: server.url,
313 path: path + suffix, 313 path: path + suffix,
@@ -316,7 +316,7 @@ describe('Test server plugins API validators', function () {
316 }) 316 })
317 } 317 }
318 318
319 for (const suffix of [ 'peertube-plugin-TOTO', 'peertube-plugin-TOTO/registered-settings' ]) { 319 for (const suffix of [ 'peertube-plugin-TOTO', 'peertube-plugin-TOTO/registered-settings', 'peertube-plugin-TOTO/public-settings' ]) {
320 await makeGetRequest({ 320 await makeGetRequest({
321 url: server.url, 321 url: server.url,
322 path: path + suffix, 322 path: path + suffix,
@@ -327,7 +327,7 @@ describe('Test server plugins API validators', function () {
327 }) 327 })
328 328
329 it('Should fail with an unknown plugin', async function () { 329 it('Should fail with an unknown plugin', async function () {
330 for (const suffix of [ 'peertube-plugin-toto', 'peertube-plugin-toto/registered-settings' ]) { 330 for (const suffix of [ 'peertube-plugin-toto', 'peertube-plugin-toto/registered-settings', 'peertube-plugin-toto/public-settings' ]) {
331 await makeGetRequest({ 331 await makeGetRequest({
332 url: server.url, 332 url: server.url,
333 path: path + suffix, 333 path: path + suffix,
@@ -338,7 +338,7 @@ describe('Test server plugins API validators', function () {
338 }) 338 })
339 339
340 it('Should succeed with the correct parameters', async function () { 340 it('Should succeed with the correct parameters', async function () {
341 for (const suffix of [ npmPlugin, `${npmPlugin}/registered-settings` ]) { 341 for (const suffix of [ npmPlugin, `${npmPlugin}/registered-settings`, `${npmPlugin}/public-settings` ]) {
342 await makeGetRequest({ 342 await makeGetRequest({
343 url: server.url, 343 url: server.url,
344 path: path + suffix, 344 path: path + suffix,