diff options
author | Roger Braun <rbraun@Bobble.local> | 2017-11-09 16:48:45 +0100 |
---|---|---|
committer | Roger Braun <rbraun@Bobble.local> | 2017-11-09 16:48:45 +0100 |
commit | 266d9c008d2a85395bb7ab773d5d548c89e7ed97 (patch) | |
tree | 15bbca8235fdabd7421fc0b1095107325eed65f9 /test | |
parent | ccde03285debe8def5d89d49b9afdcc48a76d7a6 (diff) | |
download | pleroma-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.exs | 9 |
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"}) |