Commit 7dcafb48 authored by lain's avatar lain
Browse files

MastoAPI: Add test.

parent 36fa5e88
Pipeline #6054 passed with stages
in 6 minutes and 3 seconds
......@@ -1312,6 +1312,24 @@ test "search fetches remote statuses", %{conn: conn} 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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment