aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/client.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-05 13:29:10 +0200
committerChocobozzz <me@florianbigard.com>2021-08-05 13:29:55 +0200
commit352819ef921e45381b3fbb17072926103b320e73 (patch)
tree8278744f1e5b25fbd24a29e798fcca719d31bd96 /server/tests/client.ts
parentda948b75ca7243d12de9e03822f1dc332de1a830 (diff)
downloadPeerTube-352819ef921e45381b3fbb17072926103b320e73.tar.gz
PeerTube-352819ef921e45381b3fbb17072926103b320e73.tar.zst
PeerTube-352819ef921e45381b3fbb17072926103b320e73.zip
Do not index remote actors
Diffstat (limited to 'server/tests/client.ts')
-rw-r--r--server/tests/client.ts34
1 files changed, 34 insertions, 0 deletions
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 () {
445 } 445 }
446 } 446 }
447 }) 447 })
448
449 it('Should add noindex meta tag for remote accounts', async function () {
450 const handle = 'root@' + servers[0].host
451 const paths = [ '/accounts/', '/a/', '/@' ]
452
453 for (const path of paths) {
454 {
455 const { text } = await makeHTMLRequest(servers[1].url, path + handle)
456 expect(text).to.contain('<meta name="robots" content="noindex" />')
457 }
458
459 {
460 const { text } = await makeHTMLRequest(servers[0].url, path + handle)
461 expect(text).to.not.contain('<meta name="robots" content="noindex" />')
462 }
463 }
464 })
465
466 it('Should add noindex meta tag for remote accounts', async function () {
467 const handle = 'root_channel@' + servers[0].host
468 const paths = [ '/video-channels/', '/c/', '/@' ]
469
470 for (const path of paths) {
471 {
472 const { text } = await makeHTMLRequest(servers[1].url, path + handle)
473 expect(text).to.contain('<meta name="robots" content="noindex" />')
474 }
475
476 {
477 const { text } = await makeHTMLRequest(servers[0].url, path + handle)
478 expect(text).to.not.contain('<meta name="robots" content="noindex" />')
479 }
480 }
481 })
448 }) 482 })
449 483
450 describe('Embed HTML', function () { 484 describe('Embed HTML', function () {