aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/videos-common-filters.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/tests/api/videos/videos-common-filters.ts b/server/tests/api/videos/videos-common-filters.ts
index 4f22d4ac3..ca5f42173 100644
--- a/server/tests/api/videos/videos-common-filters.ts
+++ b/server/tests/api/videos/videos-common-filters.ts
@@ -138,6 +138,7 @@ describe('Test videos filter', function () {
138 hasWebtorrentFiles?: boolean 138 hasWebtorrentFiles?: boolean
139 hasHLSFiles?: boolean 139 hasHLSFiles?: boolean
140 include?: VideoInclude 140 include?: VideoInclude
141 privacyOneOf?: VideoPrivacy[]
141 category?: number 142 category?: number
142 tagsAllOf?: string[] 143 tagsAllOf?: string[]
143 token?: string 144 token?: string
@@ -148,7 +149,7 @@ describe('Test videos filter', function () {
148 path: options.path, 149 path: options.path,
149 token: options.token ?? options.server.accessToken, 150 token: options.token ?? options.server.accessToken,
150 query: { 151 query: {
151 ...pick(options, [ 'isLocal', 'include', 'category', 'tagsAllOf', 'hasWebtorrentFiles', 'hasHLSFiles' ]), 152 ...pick(options, [ 'isLocal', 'include', 'category', 'tagsAllOf', 'hasWebtorrentFiles', 'hasHLSFiles', 'privacyOneOf' ]),
152 153
153 sort: 'createdAt' 154 sort: 'createdAt'
154 }, 155 },
@@ -162,6 +163,7 @@ describe('Test videos filter', function () {
162 server: PeerTubeServer 163 server: PeerTubeServer
163 isLocal?: boolean 164 isLocal?: boolean
164 include?: VideoInclude 165 include?: VideoInclude
166 privacyOneOf?: VideoPrivacy[]
165 token?: string 167 token?: string
166 expectedStatus?: HttpStatusCode 168 expectedStatus?: HttpStatusCode
167 }) { 169 }) {
@@ -195,7 +197,7 @@ describe('Test videos filter', function () {
195 server, 197 server,
196 token, 198 token,
197 isLocal: true, 199 isLocal: true,
198 include: VideoInclude.HIDDEN_PRIVACY 200 privacyOneOf: [ VideoPrivacy.UNLISTED, VideoPrivacy.PUBLIC, VideoPrivacy.PRIVATE ]
199 }) 201 })
200 202
201 for (const names of namesResults) { 203 for (const names of namesResults) {
@@ -216,7 +218,7 @@ describe('Test videos filter', function () {
216 const [ channelVideos, accountVideos, videos, searchVideos ] = await getVideosNames({ 218 const [ channelVideos, accountVideos, videos, searchVideos ] = await getVideosNames({
217 server, 219 server,
218 token, 220 token,
219 include: VideoInclude.HIDDEN_PRIVACY 221 privacyOneOf: [ VideoPrivacy.UNLISTED, VideoPrivacy.PUBLIC, VideoPrivacy.PRIVATE ]
220 }) 222 })
221 223
222 expect(channelVideos).to.have.lengthOf(3) 224 expect(channelVideos).to.have.lengthOf(3)