From ad9e39fb815d85e5e718c40540fa75471474fa17 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 25 May 2018 09:57:16 +0200 Subject: Only use account name in routes --- server/tests/api/videos/video-channels.ts | 5 ++--- server/tests/api/videos/video-nsfw.ts | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'server/tests/api/videos') diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index 35c418f7c..7ae505fd7 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts @@ -17,7 +17,6 @@ import { setAccessTokensToServers, updateVideoChannel } from '../../utils/index' -import { getAccountsList } from '../../utils/users/accounts' const expect = chai.expect @@ -99,7 +98,7 @@ describe('Test video channels', function () { }) it('Should have two video channels when getting account channels on server 1', async function () { - const res = await getAccountVideoChannelsList(servers[0].url, userInfo.account.uuid) + const res = await getAccountVideoChannelsList(servers[0].url, userInfo.account.name + '@' + userInfo.account.host) expect(res.body.total).to.equal(2) expect(res.body.data).to.be.an('array') expect(res.body.data).to.have.lengthOf(2) @@ -112,7 +111,7 @@ describe('Test video channels', function () { }) it('Should have one video channel when getting account channels on server 2', async function () { - const res = await getAccountVideoChannelsList(servers[1].url, userInfo.account.uuid) + const res = await getAccountVideoChannelsList(servers[1].url, userInfo.account.name + '@' + userInfo.account.host) expect(res.body.total).to.equal(1) expect(res.body.data).to.be.an('array') expect(res.body.data).to.have.lengthOf(1) diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts index b8c85f45b..a8f152561 100644 --- a/server/tests/api/videos/video-nsfw.ts +++ b/server/tests/api/videos/video-nsfw.ts @@ -32,13 +32,13 @@ describe('Test video NSFW policy', function () { .then(res => { const user: User = res.body const videoChannelUUID = user.videoChannels[0].uuid - const accountUUID = user.account.uuid + const accountName = user.account.name + '@' + user.account.host if (token) { return Promise.all([ getVideosListWithToken(server.url, token), searchVideoWithToken(server.url, 'n', token), - getAccountVideos(server.url, token, accountUUID, 0, 5), + getAccountVideos(server.url, token, accountName, 0, 5), getVideoChannelVideos(server.url, token, videoChannelUUID, 0, 5) ]) } @@ -46,7 +46,7 @@ describe('Test video NSFW policy', function () { return Promise.all([ getVideosList(server.url), searchVideo(server.url, 'n'), - getAccountVideos(server.url, undefined, accountUUID, 0, 5), + getAccountVideos(server.url, undefined, accountName, 0, 5), getVideoChannelVideos(server.url, undefined, videoChannelUUID, 0, 5) ]) }) -- cgit v1.2.3