diff options
Diffstat (limited to 'server/tests/api/videos/video-change-ownership.ts')
-rw-r--r-- | server/tests/api/videos/video-change-ownership.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts index 6ae6d3004..d6665fe4e 100644 --- a/server/tests/api/videos/video-change-ownership.ts +++ b/server/tests/api/videos/video-change-ownership.ts | |||
@@ -73,7 +73,7 @@ describe('Test video change ownership - nominal', function () { | |||
73 | } | 73 | } |
74 | const { id } = await servers[0].videos.upload({ token: firstUserToken, attributes }) | 74 | const { id } = await servers[0].videos.upload({ token: firstUserToken, attributes }) |
75 | 75 | ||
76 | servers[0].store.video = await servers[0].videos.get({ id }) | 76 | servers[0].store.videoCreated = await servers[0].videos.get({ id }) |
77 | } | 77 | } |
78 | 78 | ||
79 | { | 79 | { |
@@ -109,7 +109,7 @@ describe('Test video change ownership - nominal', function () { | |||
109 | it('Should send a request to change ownership of a video', async function () { | 109 | it('Should send a request to change ownership of a video', async function () { |
110 | this.timeout(15000) | 110 | this.timeout(15000) |
111 | 111 | ||
112 | await command.create({ token: firstUserToken, videoId: servers[0].store.video.id, username: secondUser }) | 112 | await command.create({ token: firstUserToken, videoId: servers[0].store.videoCreated.id, username: secondUser }) |
113 | }) | 113 | }) |
114 | 114 | ||
115 | it('Should only return a request to change ownership for the second user', async function () { | 115 | it('Should only return a request to change ownership for the second user', async function () { |
@@ -135,7 +135,7 @@ describe('Test video change ownership - nominal', function () { | |||
135 | it('Should accept the same change ownership request without crashing', async function () { | 135 | it('Should accept the same change ownership request without crashing', async function () { |
136 | this.timeout(10000) | 136 | this.timeout(10000) |
137 | 137 | ||
138 | await command.create({ token: firstUserToken, videoId: servers[0].store.video.id, username: secondUser }) | 138 | await command.create({ token: firstUserToken, videoId: servers[0].store.videoCreated.id, username: secondUser }) |
139 | }) | 139 | }) |
140 | 140 | ||
141 | it('Should not create multiple change ownership requests while one is waiting', async function () { | 141 | it('Should not create multiple change ownership requests while one is waiting', async function () { |
@@ -163,7 +163,7 @@ describe('Test video change ownership - nominal', function () { | |||
163 | it('Should send a new request to change ownership of a video', async function () { | 163 | it('Should send a new request to change ownership of a video', async function () { |
164 | this.timeout(15000) | 164 | this.timeout(15000) |
165 | 165 | ||
166 | await command.create({ token: firstUserToken, videoId: servers[0].store.video.id, username: secondUser }) | 166 | await command.create({ token: firstUserToken, videoId: servers[0].store.videoCreated.id, username: secondUser }) |
167 | }) | 167 | }) |
168 | 168 | ||
169 | it('Should return two requests to change ownership for the second user', async function () { | 169 | it('Should return two requests to change ownership for the second user', async function () { |
@@ -207,7 +207,7 @@ describe('Test video change ownership - nominal', function () { | |||
207 | 207 | ||
208 | it('Should have the channel of the video updated', async function () { | 208 | it('Should have the channel of the video updated', async function () { |
209 | for (const server of servers) { | 209 | for (const server of servers) { |
210 | const video = await server.videos.get({ id: servers[0].store.video.uuid }) | 210 | const video = await server.videos.get({ id: servers[0].store.videoCreated.uuid }) |
211 | 211 | ||
212 | expect(video.name).to.equal('my super name') | 212 | expect(video.name).to.equal('my super name') |
213 | expect(video.channel.displayName).to.equal('Main second channel') | 213 | expect(video.channel.displayName).to.equal('Main second channel') |
@@ -236,7 +236,7 @@ describe('Test video change ownership - nominal', function () { | |||
236 | await waitJobs(servers) | 236 | await waitJobs(servers) |
237 | 237 | ||
238 | for (const server of servers) { | 238 | for (const server of servers) { |
239 | const video = await server.videos.get({ id: servers[0].store.video.uuid }) | 239 | const video = await server.videos.get({ id: servers[0].store.videoCreated.uuid }) |
240 | 240 | ||
241 | expect(video.name).to.equal('my super name') | 241 | expect(video.name).to.equal('my super name') |
242 | expect(video.channel.displayName).to.equal('Main second channel') | 242 | expect(video.channel.displayName).to.equal('Main second channel') |
@@ -282,13 +282,13 @@ describe('Test video change ownership - quota too small', function () { | |||
282 | const { data } = await server.videos.list() | 282 | const { data } = await server.videos.list() |
283 | expect(data.length).to.equal(1) | 283 | expect(data.length).to.equal(1) |
284 | 284 | ||
285 | server.store.video = data.find(video => video.name === 'my super name') | 285 | server.store.videoCreated = data.find(video => video.name === 'my super name') |
286 | }) | 286 | }) |
287 | 287 | ||
288 | it('Should send a request to change ownership of a video', async function () { | 288 | it('Should send a request to change ownership of a video', async function () { |
289 | this.timeout(15000) | 289 | this.timeout(15000) |
290 | 290 | ||
291 | await server.changeOwnership.create({ token: firstUserToken, videoId: server.store.video.id, username: secondUser }) | 291 | await server.changeOwnership.create({ token: firstUserToken, videoId: server.store.videoCreated.id, username: secondUser }) |
292 | }) | 292 | }) |
293 | 293 | ||
294 | it('Should only return a request to change ownership for the second user', async function () { | 294 | it('Should only return a request to change ownership for the second user', async function () { |