diff options
Diffstat (limited to 'server/tests/api/search/search-activitypub-video-channels.ts')
-rw-r--r-- | server/tests/api/search/search-activitypub-video-channels.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/server/tests/api/search/search-activitypub-video-channels.ts b/server/tests/api/search/search-activitypub-video-channels.ts index d7e3ed5be..e83eb7171 100644 --- a/server/tests/api/search/search-activitypub-video-channels.ts +++ b/server/tests/api/search/search-activitypub-video-channels.ts | |||
@@ -106,9 +106,25 @@ describe('Test ActivityPub video channels search', function () { | |||
106 | } | 106 | } |
107 | }) | 107 | }) |
108 | 108 | ||
109 | it('Should search a local video channel with an alternative URL', async function () { | ||
110 | const search = 'http://localhost:' + servers[0].port + '/c/channel1_server1' | ||
111 | |||
112 | for (const token of [ undefined, servers[0].accessToken ]) { | ||
113 | const res = await searchVideoChannel(servers[0].url, search, token) | ||
114 | |||
115 | expect(res.body.total).to.equal(1) | ||
116 | expect(res.body.data).to.be.an('array') | ||
117 | expect(res.body.data).to.have.lengthOf(1) | ||
118 | expect(res.body.data[0].name).to.equal('channel1_server1') | ||
119 | expect(res.body.data[0].displayName).to.equal('Channel 1 server 1') | ||
120 | } | ||
121 | }) | ||
122 | |||
109 | it('Should search a remote video channel with URL or handle', async function () { | 123 | it('Should search a remote video channel with URL or handle', async function () { |
110 | const searches = [ | 124 | const searches = [ |
111 | 'http://localhost:' + servers[1].port + '/video-channels/channel1_server2', | 125 | 'http://localhost:' + servers[1].port + '/video-channels/channel1_server2', |
126 | 'http://localhost:' + servers[1].port + '/c/channel1_server2', | ||
127 | 'http://localhost:' + servers[1].port + '/c/channel1_server2/videos', | ||
112 | 'channel1_server2@localhost:' + servers[1].port | 128 | 'channel1_server2@localhost:' + servers[1].port |
113 | ] | 129 | ] |
114 | 130 | ||