diff options
Diffstat (limited to 'server/tests/api/users/users-multiple-servers.ts')
-rw-r--r-- | server/tests/api/users/users-multiple-servers.ts | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts index 03fbfabeb..47056be78 100644 --- a/server/tests/api/users/users-multiple-servers.ts +++ b/server/tests/api/users/users-multiple-servers.ts | |||
@@ -12,7 +12,6 @@ import { | |||
12 | flushAndRunMultipleServers, | 12 | flushAndRunMultipleServers, |
13 | getAccountVideos, | 13 | getAccountVideos, |
14 | getMyUserInformation, | 14 | getMyUserInformation, |
15 | getVideoChannelsList, | ||
16 | removeUser, | 15 | removeUser, |
17 | ServerInfo, | 16 | ServerInfo, |
18 | setAccessTokensToServers, | 17 | setAccessTokensToServers, |
@@ -23,7 +22,7 @@ import { | |||
23 | userLogin, | 22 | userLogin, |
24 | waitJobs | 23 | waitJobs |
25 | } from '@shared/extra-utils' | 24 | } from '@shared/extra-utils' |
26 | import { User, VideoChannel } from '@shared/models' | 25 | import { User } from '@shared/models' |
27 | 26 | ||
28 | const expect = chai.expect | 27 | const expect = chai.expect |
29 | 28 | ||
@@ -199,10 +198,8 @@ describe('Test users with multiple servers', function () { | |||
199 | const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) | 198 | const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) |
200 | expect(accountDeleted).not.to.be.undefined | 199 | expect(accountDeleted).not.to.be.undefined |
201 | 200 | ||
202 | const resVideoChannels = await getVideoChannelsList(server.url, 0, 10) | 201 | const { data } = await server.channelsCommand.list() |
203 | const videoChannelDeleted = resVideoChannels.body.data.find(a => { | 202 | const videoChannelDeleted = data.find(a => a.displayName === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port) |
204 | return a.displayName === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port | ||
205 | }) as VideoChannel | ||
206 | expect(videoChannelDeleted).not.to.be.undefined | 203 | expect(videoChannelDeleted).not.to.be.undefined |
207 | } | 204 | } |
208 | 205 | ||
@@ -216,10 +213,8 @@ describe('Test users with multiple servers', function () { | |||
216 | const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) | 213 | const accountDeleted = body.data.find(a => a.name === 'user1' && a.host === 'localhost:' + servers[0].port) |
217 | expect(accountDeleted).to.be.undefined | 214 | expect(accountDeleted).to.be.undefined |
218 | 215 | ||
219 | const resVideoChannels = await getVideoChannelsList(server.url, 0, 10) | 216 | const { data } = await server.channelsCommand.list() |
220 | const videoChannelDeleted = resVideoChannels.body.data.find(a => { | 217 | const videoChannelDeleted = data.find(a => a.name === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port) |
221 | return a.name === 'Main user1 channel' && a.host === 'localhost:' + servers[0].port | ||
222 | }) as VideoChannel | ||
223 | expect(videoChannelDeleted).to.be.undefined | 218 | expect(videoChannelDeleted).to.be.undefined |
224 | } | 219 | } |
225 | }) | 220 | }) |