projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
489bd30
)
MastodonAPI: Add test for user search.
author
lain
<lain@soykaf.club>
Thu, 6 Jun 2019 14:16:22 +0000
(16:16 +0200)
committer
lain
<lain@soykaf.club>
Thu, 6 Jun 2019 14:16:22 +0000
(16:16 +0200)
test/web/mastodon_api/mastodon_api_controller_test.exs
patch
|
blob
|
history
diff --git
a/test/web/mastodon_api/mastodon_api_controller_test.exs
b/test/web/mastodon_api/mastodon_api_controller_test.exs
index 51c1cdfacf23d5dddd5b5898bd6017fedc289a96..33c8e209a91dfa29158c4c23bb4fe9f6056b7e3f 100644
(file)
--- 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)