diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-02-13 21:55:47 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-02-13 21:55:47 +0300 |
commit | 4f8c3462a8821ffcf83f8b65edf48e55eff7080c (patch) | |
tree | a532e6761adde4e23f2b7e980f76e4c6f5b08148 /test/user_search_test.exs | |
parent | 9906c6fb6fb0e2ebb36fa91fae94828bcc02ef27 (diff) | |
download | pleroma-4f8c3462a8821ffcf83f8b65edf48e55eff7080c.tar.gz pleroma-4f8c3462a8821ffcf83f8b65edf48e55eff7080c.zip |
Tweaks to `clear_config` calls in tests in order to prevent side effects on config during test suite execution.
Diffstat (limited to 'test/user_search_test.exs')
-rw-r--r-- | test/user_search_test.exs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/user_search_test.exs b/test/user_search_test.exs index 821858476..fe52cc7a1 100644 --- a/test/user_search_test.exs +++ b/test/user_search_test.exs @@ -15,6 +15,8 @@ defmodule Pleroma.UserSearchTest do end describe "User.search" 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 |