diff options
Diffstat (limited to 'server/tests/api/users')
-rw-r--r-- | server/tests/api/users/users-multiple-servers.ts | 15 | ||||
-rw-r--r-- | server/tests/api/users/users.ts | 5 |
2 files changed, 7 insertions, 13 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 | }) |
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts index 4b9056306..ed670b3c9 100644 --- a/server/tests/api/users/users.ts +++ b/server/tests/api/users/users.ts | |||
@@ -18,7 +18,6 @@ import { | |||
18 | getUserInformation, | 18 | getUserInformation, |
19 | getUsersList, | 19 | getUsersList, |
20 | getUsersListPaginationAndSort, | 20 | getUsersListPaginationAndSort, |
21 | getVideoChannel, | ||
22 | getVideosList, | 21 | getVideosList, |
23 | killallServers, | 22 | killallServers, |
24 | login, | 23 | login, |
@@ -864,9 +863,9 @@ describe('Test users', function () { | |||
864 | }) | 863 | }) |
865 | 864 | ||
866 | it('Should have created the channel', async function () { | 865 | it('Should have created the channel', async function () { |
867 | const res = await getVideoChannel(server.url, 'my_user_15_channel') | 866 | const { displayName } = await server.channelsCommand.get({ channelName: 'my_user_15_channel' }) |
868 | 867 | ||
869 | expect(res.body.displayName).to.equal('my channel rocks') | 868 | expect(displayName).to.equal('my channel rocks') |
870 | }) | 869 | }) |
871 | 870 | ||
872 | it('Should remove me', async function () { | 871 | it('Should remove me', async function () { |