From 352819ef921e45381b3fbb17072926103b320e73 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 5 Aug 2021 13:29:10 +0200 Subject: Do not index remote actors --- server/tests/client.ts | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'server/tests/client.ts') diff --git a/server/tests/client.ts b/server/tests/client.ts index 4cbdb2cb3..4f0d052c8 100644 --- a/server/tests/client.ts +++ b/server/tests/client.ts @@ -445,6 +445,40 @@ describe('Test a client controllers', function () { } } }) + + it('Should add noindex meta tag for remote accounts', async function () { + const handle = 'root@' + servers[0].host + const paths = [ '/accounts/', '/a/', '/@' ] + + for (const path of paths) { + { + const { text } = await makeHTMLRequest(servers[1].url, path + handle) + expect(text).to.contain('') + } + + { + const { text } = await makeHTMLRequest(servers[0].url, path + handle) + expect(text).to.not.contain('') + } + } + }) + + it('Should add noindex meta tag for remote accounts', async function () { + const handle = 'root_channel@' + servers[0].host + const paths = [ '/video-channels/', '/c/', '/@' ] + + for (const path of paths) { + { + const { text } = await makeHTMLRequest(servers[1].url, path + handle) + expect(text).to.contain('') + } + + { + const { text } = await makeHTMLRequest(servers[0].url, path + handle) + expect(text).to.not.contain('') + } + } + }) }) describe('Embed HTML', function () { -- cgit v1.2.3