X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fuser_search_test.exs;h=69167bb0c84a0e3abbc11c5d4f4cc028070e49b6;hb=2a520ba008f432e7e1fa297954966e0181245f01;hp=accb0b816dbfc41ea261d3cb67eb182bd4309828;hpb=477c6c8e558c1b1f193caadb6172db840c1910a4;p=akkoma
diff --git a/test/pleroma/user_search_test.exs b/test/pleroma/user_search_test.exs
index accb0b816..69167bb0c 100644
--- a/test/pleroma/user_search_test.exs
+++ b/test/pleroma/user_search_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.UserSearchTest do
@@ -18,7 +18,7 @@ defmodule Pleroma.UserSearchTest do
setup do: clear_config([:instance, :limit_to_local_content])
test "returns a resolved user as the first result" do
- Pleroma.Config.put([:instance, :limit_to_local_content], false)
+ clear_config([:instance, :limit_to_local_content], false)
user = insert(:user, %{nickname: "no_relation", ap_id: "https://lain.com/users/lain"})
_user = insert(:user, %{nickname: "com_user"})
@@ -199,7 +199,7 @@ defmodule Pleroma.UserSearchTest do
end
test "find only local users for authenticated users when `limit_to_local_content` is `:all`" do
- Pleroma.Config.put([:instance, :limit_to_local_content], :all)
+ clear_config([:instance, :limit_to_local_content], :all)
%{id: id} = insert(:user, %{name: "lain"})
insert(:user, %{name: "ebn", nickname: "lain@mastodon.social", local: false})
@@ -209,7 +209,7 @@ defmodule Pleroma.UserSearchTest do
end
test "find all users for unauthenticated users when `limit_to_local_content` is `false`" do
- Pleroma.Config.put([:instance, :limit_to_local_content], false)
+ clear_config([:instance, :limit_to_local_content], false)
u1 = insert(:user, %{name: "lain"})
u2 = insert(:user, %{name: "ebn", nickname: "lain@mastodon.social", local: false})