diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-15 10:02:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | d23dd9fbfc4d26026352c10f81d2795ceaf2908a (patch) | |
tree | da82286d423c5e834a1ee2dcd5970076b8263cf1 /server/tests/api/check-params/services.ts | |
parent | 7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (diff) | |
download | PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.gz PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.zst PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.zip |
Introduce videos command
Diffstat (limited to 'server/tests/api/check-params/services.ts')
-rw-r--r-- | server/tests/api/check-params/services.ts | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/server/tests/api/check-params/services.ts b/server/tests/api/check-params/services.ts index 595fab70d..f86712b4e 100644 --- a/server/tests/api/check-params/services.ts +++ b/server/tests/api/check-params/services.ts | |||
@@ -1,17 +1,16 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import { VideoPlaylistPrivacy } from '@shared/models' | 4 | import { HttpStatusCode } from '@shared/core-utils' |
5 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
6 | import { | 5 | import { |
7 | cleanupTests, | 6 | cleanupTests, |
8 | flushAndRunServer, | 7 | flushAndRunServer, |
9 | makeGetRequest, | 8 | makeGetRequest, |
10 | ServerInfo, | 9 | ServerInfo, |
11 | setAccessTokensToServers, | 10 | setAccessTokensToServers, |
12 | setDefaultVideoChannel, | 11 | setDefaultVideoChannel |
13 | uploadVideo | 12 | } from '@shared/extra-utils' |
14 | } from '../../../../shared/extra-utils' | 13 | import { VideoPlaylistPrivacy } from '@shared/models' |
15 | 14 | ||
16 | describe('Test services API validators', function () { | 15 | describe('Test services API validators', function () { |
17 | let server: ServerInfo | 16 | let server: ServerInfo |
@@ -26,10 +25,7 @@ describe('Test services API validators', function () { | |||
26 | await setAccessTokensToServers([ server ]) | 25 | await setAccessTokensToServers([ server ]) |
27 | await setDefaultVideoChannel([ server ]) | 26 | await setDefaultVideoChannel([ server ]) |
28 | 27 | ||
29 | { | 28 | server.video = await server.videosCommand.upload({ attributes: { name: 'my super name' } }) |
30 | const res = await uploadVideo(server.url, server.accessToken, { name: 'my super name' }) | ||
31 | server.video = res.body.video | ||
32 | } | ||
33 | 29 | ||
34 | { | 30 | { |
35 | const created = await server.playlistsCommand.create({ | 31 | const created = await server.playlistsCommand.create({ |