diff options
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r-- | server/tests/api/videos/video-privacy.ts | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts index ef1cf0f07..40b539106 100644 --- a/server/tests/api/videos/video-privacy.ts +++ b/server/tests/api/videos/video-privacy.ts | |||
@@ -6,8 +6,7 @@ import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enu | |||
6 | import { | 6 | import { |
7 | cleanupTests, | 7 | cleanupTests, |
8 | flushAndRunMultipleServers, | 8 | flushAndRunMultipleServers, |
9 | getVideosList, | 9 | getVideosList, getVideosListWithToken, |
10 | killallServers, | ||
11 | ServerInfo, | 10 | ServerInfo, |
12 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
13 | uploadVideo | 12 | uploadVideo |
@@ -153,6 +152,29 @@ describe('Test video privacy', function () { | |||
153 | } | 152 | } |
154 | }) | 153 | }) |
155 | 154 | ||
155 | it('Should set this new video as private', async function () { | ||
156 | this.timeout(10000) | ||
157 | |||
158 | await updateVideo(servers[0].url, servers[0].accessToken, privateVideoId, { privacy: VideoPrivacy.PRIVATE }) | ||
159 | |||
160 | await waitJobs(servers) | ||
161 | |||
162 | for (const server of servers) { | ||
163 | const res = await getVideosList(server.url) | ||
164 | |||
165 | expect(res.body.total).to.equal(0) | ||
166 | expect(res.body.data).to.have.lengthOf(0) | ||
167 | } | ||
168 | |||
169 | { | ||
170 | const res = await getMyVideos(servers[0].url, servers[0].accessToken, 0, 5) | ||
171 | |||
172 | expect(res.body.total).to.equal(1) | ||
173 | expect(res.body.data).to.have.lengthOf(1) | ||
174 | expect(res.body.data[0].name).to.equal('super video public') | ||
175 | } | ||
176 | }) | ||
177 | |||
156 | after(async function () { | 178 | after(async function () { |
157 | await cleanupTests(servers) | 179 | await cleanupTests(servers) |
158 | }) | 180 | }) |