Merge branch 'develop' into 'remove-twitter-api'
[akkoma] / test / web / metadata / restrict_indexing_test.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.Metadata.Providers.RestrictIndexingTest do
6 use ExUnit.Case, async: true
7
8 describe "build_tags/1" do
9 test "for remote user" do
10 assert Pleroma.Web.Metadata.Providers.RestrictIndexing.build_tags(%{
11 user: %Pleroma.User{local: false}
12 }) == [{:meta, [name: "robots", content: "noindex, noarchive"], []}]
13 end
14
15 test "for local user" do
16 assert Pleroma.Web.Metadata.Providers.RestrictIndexing.build_tags(%{
17 user: %Pleroma.User{local: true}
18 }) == []
19 end
20 end
21 end