1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.MetadataTest do
6 use Pleroma.DataCase, async: true
10 describe "restrict indexing remote users" do
11 test "for remote user" do
12 user = insert(:user, local: false)
14 assert Pleroma.Web.Metadata.build_tags(%{user: user}) =~
15 "<meta content=\"noindex, noarchive\" name=\"robots\">"
18 test "for local user" do
21 refute Pleroma.Web.Metadata.build_tags(%{user: user}) =~
22 "<meta content=\"noindex, noarchive\" name=\"robots\">"