aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/videos/video-privacy.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts
index 469274921..8ab37189a 100644
--- a/server/tests/api/videos/video-privacy.ts
+++ b/server/tests/api/videos/video-privacy.ts
@@ -22,9 +22,10 @@ const expect = chai.expect
22 22
23describe('Test video privacy', function () { 23describe('Test video privacy', function () {
24 let servers: ServerInfo[] = [] 24 let servers: ServerInfo[] = []
25 let privateVideoId 25 let privateVideoId: number
26 let privateVideoUUID 26 let privateVideoUUID: string
27 let unlistedVideoUUID 27 let unlistedVideoUUID: string
28 let now: number
28 29
29 before(async function () { 30 before(async function () {
30 this.timeout(50000) 31 this.timeout(50000)
@@ -133,6 +134,7 @@ describe('Test video privacy', function () {
133 privacy: VideoPrivacy.PUBLIC 134 privacy: VideoPrivacy.PUBLIC
134 } 135 }
135 136
137 now = Date.now()
136 await updateVideo(servers[0].url, servers[0].accessToken, privateVideoId, attribute) 138 await updateVideo(servers[0].url, servers[0].accessToken, privateVideoId, attribute)
137 139
138 await wait(5000) 140 await wait(5000)
@@ -145,6 +147,7 @@ describe('Test video privacy', function () {
145 expect(res.body.total).to.equal(1) 147 expect(res.body.total).to.equal(1)
146 expect(res.body.data).to.have.lengthOf(1) 148 expect(res.body.data).to.have.lengthOf(1)
147 expect(res.body.data[0].name).to.equal('super video public') 149 expect(res.body.data[0].name).to.equal('super video public')
150 expect(new Date(res.body.data[0].publishedAt).getTime()).to.be.at.least(now)
148 } 151 }
149 }) 152 })
150 153