Merge branch 'fix/elixir-master-deprecation-warnings' into 'develop'
[akkoma] / test / web / mastodon_api / mastodon_api_controller_test.exs
index 51c1cdfacf23d5dddd5b5898bd6017fedc289a96..33c8e209a91dfa29158c4c23bb4fe9f6056b7e3f 100644 (file)
@@ -2185,6 +2185,15 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
     assert account["acct"] == "shp@social.heldscal.la"
   end
 
+  test "search doesn't fetch remote accounts if resolve is false", %{conn: conn} do
+    conn =
+      conn
+      |> get("/api/v1/search", %{"q" => "shp@social.heldscal.la", "resolve" => "false"})
+
+    assert results = json_response(conn, 200)
+    assert [] == results["accounts"]
+  end
+
   test "returns the favorites of a user", %{conn: conn} do
     user = insert(:user)
     other_user = insert(:user)