diff options
Diffstat (limited to 'server/tests/plugins/plugin-router.ts')
-rw-r--r-- | server/tests/plugins/plugin-router.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server/tests/plugins/plugin-router.ts b/server/tests/plugins/plugin-router.ts index cf4130f4b..9e78568cd 100644 --- a/server/tests/plugins/plugin-router.ts +++ b/server/tests/plugins/plugin-router.ts | |||
@@ -10,6 +10,7 @@ import { | |||
10 | setAccessTokensToServers, uninstallPlugin | 10 | setAccessTokensToServers, uninstallPlugin |
11 | } from '../../../shared/extra-utils' | 11 | } from '../../../shared/extra-utils' |
12 | import { expect } from 'chai' | 12 | import { expect } from 'chai' |
13 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
13 | 14 | ||
14 | describe('Test plugin helpers', function () { | 15 | describe('Test plugin helpers', function () { |
15 | let server: ServerInfo | 16 | let server: ServerInfo |
@@ -36,7 +37,7 @@ describe('Test plugin helpers', function () { | |||
36 | const res = await makeGetRequest({ | 37 | const res = await makeGetRequest({ |
37 | url: server.url, | 38 | url: server.url, |
38 | path: path + 'ping', | 39 | path: path + 'ping', |
39 | statusCodeExpected: 200 | 40 | statusCodeExpected: HttpStatusCode.OK_200 |
40 | }) | 41 | }) |
41 | 42 | ||
42 | expect(res.body.message).to.equal('pong') | 43 | expect(res.body.message).to.equal('pong') |
@@ -55,7 +56,7 @@ describe('Test plugin helpers', function () { | |||
55 | url: server.url, | 56 | url: server.url, |
56 | path: path + 'form/post/mirror', | 57 | path: path + 'form/post/mirror', |
57 | fields: body, | 58 | fields: body, |
58 | statusCodeExpected: 200 | 59 | statusCodeExpected: HttpStatusCode.OK_200 |
59 | }) | 60 | }) |
60 | 61 | ||
61 | expect(res.body).to.deep.equal(body) | 62 | expect(res.body).to.deep.equal(body) |
@@ -73,14 +74,14 @@ describe('Test plugin helpers', function () { | |||
73 | await makeGetRequest({ | 74 | await makeGetRequest({ |
74 | url: server.url, | 75 | url: server.url, |
75 | path: path + 'ping', | 76 | path: path + 'ping', |
76 | statusCodeExpected: 404 | 77 | statusCodeExpected: HttpStatusCode.NOT_FOUND_404 |
77 | }) | 78 | }) |
78 | 79 | ||
79 | await makePostBodyRequest({ | 80 | await makePostBodyRequest({ |
80 | url: server.url, | 81 | url: server.url, |
81 | path: path + 'ping', | 82 | path: path + 'ping', |
82 | fields: {}, | 83 | fields: {}, |
83 | statusCodeExpected: 404 | 84 | statusCodeExpected: HttpStatusCode.NOT_FOUND_404 |
84 | }) | 85 | }) |
85 | } | 86 | } |
86 | }) | 87 | }) |