+
+ it('Should use the original video URL for the canonical tag', async function () {
+ const res = await makeHTMLRequest(servers[1].url, '/videos/watch/' + servers[0].video.uuid)
+ expect(res.text).to.contain(`<link rel="canonical" href="${servers[0].url}/videos/watch/${servers[0].video.uuid}" />`)
+ })
+
+ it('Should use the original account URL for the canonical tag', async function () {
+ const res = await makeHTMLRequest(servers[1].url, '/accounts/root@' + servers[0].host)
+ expect(res.text).to.contain(`<link rel="canonical" href="${servers[0].url}/accounts/root" />`)
+ })
+
+ it('Should use the original channel URL for the canonical tag', async function () {
+ const res = await makeHTMLRequest(servers[1].url, '/video-channels/root_channel@' + servers[0].host)
+ expect(res.text).to.contain(`<link rel="canonical" href="${servers[0].url}/video-channels/root_channel" />`)
+ })
+
+ it('Should use the original playlist URL for the canonical tag', async function () {
+ const res = await makeHTMLRequest(servers[1].url, '/videos/watch/playlist/' + playlistUUID)
+ expect(res.text).to.contain(`<link rel="canonical" href="${servers[0].url}/video-playlists/${playlistUUID}" />`)
+ })