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/misc-endpoints.ts | |
parent | 7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (diff) | |
download | PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.gz PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.zst PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.zip |
Introduce videos command
Diffstat (limited to 'server/tests/misc-endpoints.ts')
-rw-r--r-- | server/tests/misc-endpoints.ts | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/server/tests/misc-endpoints.ts b/server/tests/misc-endpoints.ts index 84bdcaabf..b5b10bd5e 100644 --- a/server/tests/misc-endpoints.ts +++ b/server/tests/misc-endpoints.ts | |||
@@ -3,15 +3,8 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { HttpStatusCode } from '@shared/core-utils' | 5 | import { HttpStatusCode } from '@shared/core-utils' |
6 | import { | 6 | import { cleanupTests, flushAndRunServer, makeGetRequest, ServerInfo, setAccessTokensToServers } from '@shared/extra-utils' |
7 | cleanupTests, | 7 | import { VideoPrivacy } from '@shared/models' |
8 | flushAndRunServer, | ||
9 | makeGetRequest, | ||
10 | ServerInfo, | ||
11 | setAccessTokensToServers, | ||
12 | uploadVideo | ||
13 | } from '../../shared/extra-utils' | ||
14 | import { VideoPrivacy } from '../../shared/models/videos' | ||
15 | 8 | ||
16 | const expect = chai.expect | 9 | const expect = chai.expect |
17 | 10 | ||
@@ -165,9 +158,9 @@ describe('Test misc endpoints', function () { | |||
165 | it('Should add videos, channel and accounts and get sitemap', async function () { | 158 | it('Should add videos, channel and accounts and get sitemap', async function () { |
166 | this.timeout(35000) | 159 | this.timeout(35000) |
167 | 160 | ||
168 | await uploadVideo(server.url, server.accessToken, { name: 'video 1', nsfw: false }) | 161 | await server.videosCommand.upload({ attributes: { name: 'video 1', nsfw: false } }) |
169 | await uploadVideo(server.url, server.accessToken, { name: 'video 2', nsfw: false }) | 162 | await server.videosCommand.upload({ attributes: { name: 'video 2', nsfw: false } }) |
170 | await uploadVideo(server.url, server.accessToken, { name: 'video 3', privacy: VideoPrivacy.PRIVATE }) | 163 | await server.videosCommand.upload({ attributes: { name: 'video 3', privacy: VideoPrivacy.PRIVATE } }) |
171 | 164 | ||
172 | await server.channelsCommand.create({ attributes: { name: 'channel1', displayName: 'channel 1' } }) | 165 | await server.channelsCommand.create({ attributes: { name: 'channel1', displayName: 'channel 1' } }) |
173 | await server.channelsCommand.create({ attributes: { name: 'channel2', displayName: 'channel 2' } }) | 166 | await server.channelsCommand.create({ attributes: { name: 'channel2', displayName: 'channel 2' } }) |