diff options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/client.ts | 34 |
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 () { |