aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/plugins.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-19 14:36:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2019-07-24 10:58:16 +0200
commit09071200c73f5358e1d0bfb61a274e4f2c4ec52b (patch)
tree602749b149df1675518846dd223105196b19a557 /server/tests/api/check-params/plugins.ts
parent9b474844e85cce916370693cc24f53339a695570 (diff)
downloadPeerTube-09071200c73f5358e1d0bfb61a274e4f2c4ec52b.tar.gz
PeerTube-09071200c73f5358e1d0bfb61a274e4f2c4ec52b.tar.zst
PeerTube-09071200c73f5358e1d0bfb61a274e4f2c4ec52b.zip
Add plugin API tests
Diffstat (limited to 'server/tests/api/check-params/plugins.ts')
-rw-r--r--server/tests/api/check-params/plugins.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/server/tests/api/check-params/plugins.ts b/server/tests/api/check-params/plugins.ts
index dd03766c9..83ce6f451 100644
--- a/server/tests/api/check-params/plugins.ts
+++ b/server/tests/api/check-params/plugins.ts
@@ -152,7 +152,8 @@ describe('Test server plugins API validators', function () {
152 const path = '/api/v1/plugins/available' 152 const path = '/api/v1/plugins/available'
153 const baseQuery = { 153 const baseQuery = {
154 search: 'super search', 154 search: 'super search',
155 pluginType: PluginType.PLUGIN 155 pluginType: PluginType.PLUGIN,
156 currentPeerTubeEngine: '1.2.3'
156 } 157 }
157 158
158 it('Should fail with an invalid token', async function () { 159 it('Should fail with an invalid token', async function () {
@@ -198,6 +199,17 @@ describe('Test server plugins API validators', function () {
198 }) 199 })
199 }) 200 })
200 201
202 it('Should fail with an invalid current peertube engine', async function () {
203 const query = immutableAssign(baseQuery, { currentPeerTubeEngine: '1.0' })
204
205 await makeGetRequest({
206 url: server.url,
207 path,
208 token: server.accessToken,
209 query
210 })
211 })
212
201 it('Should success with the correct parameters', async function () { 213 it('Should success with the correct parameters', async function () {
202 await makeGetRequest({ 214 await makeGetRequest({
203 url: server.url, 215 url: server.url,