aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-06-06 16:16:22 +0200
committerlain <lain@soykaf.club>2019-06-06 16:16:22 +0200
commit7e9f7ea0c21d51c5fedf89ea1feb503b77c78bba (patch)
treeddbaf51bd3c6858f12eb9ebdbf9e5b229eb53cca /test
parent489bd30fb93543acfe70ef70db3830c62e5980bc (diff)
downloadpleroma-7e9f7ea0c21d51c5fedf89ea1feb503b77c78bba.tar.gz
MastodonAPI: Add test for user search.
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/web/mastodon_api/mastodon_api_controller_test.exs b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 51c1cdfac..33c8e209a 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -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)