X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=test%2Fuser_search_test.exs;h=cb847b516df2d1e36ac3deecae17aad620c3cf7a;hb=dda65f7799e9dfa2e7b87389848eeee10993a858;hp=82185847672a6a2e5affa1be18339721fd78f0f6;hpb=a52da55eb9c6bbf8a08bf1d90d59a48dc25f5907;p=akkoma
diff --git a/test/user_search_test.exs b/test/user_search_test.exs
index 821858476..cb847b516 100644
--- a/test/user_search_test.exs
+++ b/test/user_search_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.UserSearchTest do
@@ -15,6 +15,8 @@ defmodule Pleroma.UserSearchTest do
end
describe "User.search" do
+ setup do: clear_config([:instance, :limit_to_local_content])
+
test "excluded invisible users from results" do
user = insert(:user, %{nickname: "john t1000"})
insert(:user, %{invisible: true, nickname: "john t800"})
@@ -127,8 +129,6 @@ defmodule Pleroma.UserSearchTest do
insert(:user, %{nickname: "lain@pleroma.soykaf.com", local: false})
assert [%{id: ^id}] = User.search("lain")
-
- Pleroma.Config.put([:instance, :limit_to_local_content], :unauthenticated)
end
test "find all users for unauthenticated users when `limit_to_local_content` is `false`" do
@@ -145,8 +145,6 @@ defmodule Pleroma.UserSearchTest do
|> Enum.sort()
assert [u1.id, u2.id, u3.id] == results
-
- Pleroma.Config.put([:instance, :limit_to_local_content], :unauthenticated)
end
test "does not yield false-positive matches" do