aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-01-07 20:55:32 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-01-07 20:55:32 +0700
commitf24087f96ed31a18ed73b6e2d2c7b3a6ec1e6df6 (patch)
tree0f45822223ce9973162829e8bf6b4c47eec67562 /test
parent380e9fba21123467b41629828f97d5f2c257a128 (diff)
parentb640cf0ce09f2c3f81ad8f74a4a536be34605c49 (diff)
downloadpleroma-f24087f96ed31a18ed73b6e2d2c7b3a6ec1e6df6.tar.gz
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/pinned-posts
Diffstat (limited to 'test')
-rw-r--r--test/web/mastodon_api/mastodon_api_controller_test.exs18
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 7f6c9fb88..5ff7ef259 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