diff options
author | lambda <pleromagit@rogerbraun.net> | 2019-01-07 12:20:15 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2019-01-07 12:20:15 +0000 |
commit | b640cf0ce09f2c3f81ad8f74a4a536be34605c49 (patch) | |
tree | 24bce7413b4be1dbee69e0e2b3724847ff58b7a7 /test | |
parent | b0e8e521fbbae4f601c6d2f449ea0e3effe57932 (diff) | |
parent | 7dcafb4894006bd9f531403fe585ec4938d4de12 (diff) | |
download | pleroma-b640cf0ce09f2c3f81ad8f74a4a536be34605c49.tar.gz |
Merge branch 'scarlett/pleroma-search-visibility-check' into 'develop'
Scarlett/pleroma search visibility check
See merge request pleroma/pleroma!635
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/mastodon_api_controller_test.exs | 18 |
1 files changed, 18 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 0136acf8c..ce87010c8 100644 --- a/test/web/mastodon_api/mastodon_api_controller_test.exs +++ b/test/web/mastodon_api/mastodon_api_controller_test.exs @@ -1312,6 +1312,24 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do end) end + test "search doesn't show statuses that it shouldn't", %{conn: conn} do + {:ok, activity} = + CommonAPI.post(insert(:user), %{ + "status" => "This is about 2hu, but private", + "visibility" => "private" + }) + + capture_log(fn -> + conn = + conn + |> get("/api/v1/search", %{"q" => activity.data["object"]["id"]}) + + assert results = json_response(conn, 200) + + [] = results["statuses"] + end) + end + test "search fetches remote accounts", %{conn: conn} do conn = conn |