summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRoger Braun <rbraun@Bobble.local>2017-11-09 16:48:45 +0100
committerRoger Braun <rbraun@Bobble.local>2017-11-09 16:48:45 +0100
commit266d9c008d2a85395bb7ab773d5d548c89e7ed97 (patch)
tree15bbca8235fdabd7421fc0b1095107325eed65f9 /test
parentccde03285debe8def5d89d49b9afdcc48a76d7a6 (diff)
downloadpleroma-266d9c008d2a85395bb7ab773d5d548c89e7ed97.tar.gz
pleroma-266d9c008d2a85395bb7ab773d5d548c89e7ed97.zip
MastoAPI: Fetch statuses in 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 d118026eb..8bbdecaa8 100644
--- a/test/web/mastodon_api/mastodon_api_controller_test.exs
+++ b/test/web/mastodon_api/mastodon_api_controller_test.exs
@@ -386,6 +386,15 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
assert status["id"] == to_string(activity.id)
end
+ test "search fetches remote statuses", %{conn: conn} do
+ conn = conn
+ |> get("/api/v1/search", %{"q" => "https://shitposter.club/notice/2827873"})
+ assert results = json_response(conn, 200)
+
+ [status] = results["statuses"]
+ assert status["uri"] == "tag:shitposter.club,2017-05-05:noticeId=2827873:objectType=comment"
+ end
+
test "search fetches remote accounts", %{conn: conn} do
conn = conn
|> get("/api/v1/search", %{"q" => "shp@social.heldscal.la", "resolve" => "true"})