diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 10:42:24 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea (patch) | |
tree | baf29753ac5d4598643e3bee719f8df0cc36c59d /server/tests/external-plugins/auto-mute.ts | |
parent | 08642a765ea514a00f159db898edf14c376fbe6c (diff) | |
download | PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.gz PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.tar.zst PeerTube-c0e8b12e7fd554ba4d2ceb0c4900804c6a4c63ea.zip |
Refactor requests
Diffstat (limited to 'server/tests/external-plugins/auto-mute.ts')
-rw-r--r-- | server/tests/external-plugins/auto-mute.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/external-plugins/auto-mute.ts b/server/tests/external-plugins/auto-mute.ts index 771201505..b2046313b 100644 --- a/server/tests/external-plugins/auto-mute.ts +++ b/server/tests/external-plugins/auto-mute.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { expect } from 'chai' | 4 | import { expect } from 'chai' |
5 | import { HttpStatusCode } from '@shared/core-utils' | 5 | import { HttpStatusCode } from '@shared/models' |
6 | import { | 6 | import { |
7 | cleanupTests, | 7 | cleanupTests, |
8 | doubleFollow, | 8 | doubleFollow, |
@@ -34,8 +34,8 @@ describe('Official plugin auto-mute', function () { | |||
34 | blocklistServer = new MockBlocklist() | 34 | blocklistServer = new MockBlocklist() |
35 | port = await blocklistServer.initialize() | 35 | port = await blocklistServer.initialize() |
36 | 36 | ||
37 | await await servers[0].videos.quickUpload({ name: 'video server 1' }) | 37 | await servers[0].videos.quickUpload({ name: 'video server 1' }) |
38 | await await servers[1].videos.quickUpload({ name: 'video server 2' }) | 38 | await servers[1].videos.quickUpload({ name: 'video server 2' }) |
39 | 39 | ||
40 | await doubleFollow(servers[0], servers[1]) | 40 | await doubleFollow(servers[0], servers[1]) |
41 | }) | 41 | }) |
@@ -162,7 +162,7 @@ describe('Official plugin auto-mute', function () { | |||
162 | await makeGetRequest({ | 162 | await makeGetRequest({ |
163 | url: servers[0].url, | 163 | url: servers[0].url, |
164 | path: '/plugins/auto-mute/router/api/v1/mute-list', | 164 | path: '/plugins/auto-mute/router/api/v1/mute-list', |
165 | statusCodeExpected: HttpStatusCode.FORBIDDEN_403 | 165 | expectedStatus: HttpStatusCode.FORBIDDEN_403 |
166 | }) | 166 | }) |
167 | }) | 167 | }) |
168 | 168 | ||
@@ -179,7 +179,7 @@ describe('Official plugin auto-mute', function () { | |||
179 | await makeGetRequest({ | 179 | await makeGetRequest({ |
180 | url: servers[0].url, | 180 | url: servers[0].url, |
181 | path: '/plugins/auto-mute/router/api/v1/mute-list', | 181 | path: '/plugins/auto-mute/router/api/v1/mute-list', |
182 | statusCodeExpected: HttpStatusCode.OK_200 | 182 | expectedStatus: HttpStatusCode.OK_200 |
183 | }) | 183 | }) |
184 | }) | 184 | }) |
185 | 185 | ||
@@ -201,7 +201,7 @@ describe('Official plugin auto-mute', function () { | |||
201 | const res = await makeGetRequest({ | 201 | const res = await makeGetRequest({ |
202 | url: servers[0].url, | 202 | url: servers[0].url, |
203 | path: '/plugins/auto-mute/router/api/v1/mute-list', | 203 | path: '/plugins/auto-mute/router/api/v1/mute-list', |
204 | statusCodeExpected: HttpStatusCode.OK_200 | 204 | expectedStatus: HttpStatusCode.OK_200 |
205 | }) | 205 | }) |
206 | 206 | ||
207 | const data = res.body.data | 207 | const data = res.body.data |