X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fpleroma%2Fweb%2Fmastodon_api%2Fcontrollers%2Fsearch_controller_test.exs;h=1dd0fa3b8392c6518947ab83060c53b68d7e01cc;hb=3aa25b008d145bc7bfda907bca3b327753380728;hp=04dc6f4458cf86156090b9c95f25d47e50ffc850;hpb=b738f709532ff18845f5d8cc3888d0bd67f750ab;p=akkoma
diff --git a/test/pleroma/web/mastodon_api/controllers/search_controller_test.exs b/test/pleroma/web/mastodon_api/controllers/search_controller_test.exs
index 04dc6f445..1dd0fa3b8 100644
--- a/test/pleroma/web/mastodon_api/controllers/search_controller_test.exs
+++ b/test/pleroma/web/mastodon_api/controllers/search_controller_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.Web.MastodonAPI.SearchControllerTest do
@@ -279,6 +279,10 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
end
test "search fetches remote statuses and prefers them over other results", %{conn: conn} do
+ old_version = :persistent_term.get({Pleroma.Repo, :postgres_version})
+ :persistent_term.put({Pleroma.Repo, :postgres_version}, 10.0)
+ on_exit(fn -> :persistent_term.put({Pleroma.Repo, :postgres_version}, old_version) end)
+
capture_log(fn ->
{:ok, %{id: activity_id}} =
CommonAPI.post(insert(:user), %{
@@ -305,7 +309,7 @@ defmodule Pleroma.Web.MastodonAPI.SearchControllerTest do
})
capture_log(fn ->
- q = Object.normalize(activity).data["id"]
+ q = Object.normalize(activity, fetch: false).data["id"]
results =
conn