Merge branch 'chore/bump-linkify' into 'develop'
[akkoma] / test / pleroma / web / mastodon_api / controllers / search_controller_test.exs
index b77614b7c5554b253cff2529b04cfc3a77f5af93..2f0bce450ddfb0cd9c59807e69694f057e29d51e 100644 (file)
@@ -279,7 +279,8 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
     end
 
     test "search fetches remote statuses and prefers them over other results", %{conn: conn} do
-      clear_config([:instance, :search_function], :plain)
+      old_version = :persistent_term.get({Pleroma.Repo, :postgres_version})
+      :persistent_term.put({Pleroma.Repo, :postgres_version}, 10.0)
 
       capture_log(fn ->
         {:ok, %{id: activity_id}} =
@@ -297,6 +298,8 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
                  %{"id" => ^activity_id}
                ] = results["statuses"]
       end)
+
+      :persistent_term.put({Pleroma.Repo, :postgres_version}, old_version)
     end
 
     test "search doesn't show statuses that it shouldn't", %{conn: conn} do