Add tests for privately announcing statuses via API
This commit is contained in:
parent
4c1f158f5d
commit
7d5a9f3f6d
2 changed files with 30 additions and 0 deletions
|
|
@ -547,6 +547,24 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
assert to_string(activity.id) == id
|
||||
end
|
||||
|
||||
test "reblogs privately and returns the reblogged status", %{conn: conn} do
|
||||
activity = insert(:note_activity)
|
||||
user = insert(:user)
|
||||
|
||||
conn =
|
||||
conn
|
||||
|> assign(:user, user)
|
||||
|> post("/api/v1/statuses/#{activity.id}/reblog", %{"visibility" => "private"})
|
||||
|
||||
assert %{
|
||||
"reblog" => %{"id" => id, "reblogged" => true, "reblogs_count" => 0},
|
||||
"reblogged" => true,
|
||||
"visibility" => "private"
|
||||
} = json_response(conn, 200)
|
||||
|
||||
assert to_string(activity.id) == id
|
||||
end
|
||||
|
||||
test "reblogged status for another user", %{conn: conn} do
|
||||
activity = insert(:note_activity)
|
||||
user1 = insert(:user)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue