Merge branch 'develop' into refactor/deactivated_user_field
This commit is contained in:
commit
537ba1c5e0
48 changed files with 1066 additions and 214 deletions
|
|
@ -954,6 +954,23 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
|||
|
||||
assert to_string(activity.id) == id
|
||||
end
|
||||
|
||||
test "author can reblog own private status", %{conn: conn, user: user} do
|
||||
{:ok, activity} = CommonAPI.post(user, %{status: "cofe", visibility: "private"})
|
||||
|
||||
conn =
|
||||
conn
|
||||
|> put_req_header("content-type", "application/json")
|
||||
|> post("/api/v1/statuses/#{activity.id}/reblog")
|
||||
|
||||
assert %{
|
||||
"reblog" => %{"id" => id, "reblogged" => true, "reblogs_count" => 1},
|
||||
"reblogged" => true,
|
||||
"visibility" => "private"
|
||||
} = json_response_and_validate_schema(conn, 200)
|
||||
|
||||
assert to_string(activity.id) == id
|
||||
end
|
||||
end
|
||||
|
||||
describe "unreblogging" do
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
tags: [
|
||||
%{
|
||||
name: "#{object_data["tag"]}",
|
||||
url: "/tag/#{object_data["tag"]}"
|
||||
url: "http://localhost:4001/tag/#{object_data["tag"]}"
|
||||
}
|
||||
],
|
||||
application: %{
|
||||
|
|
@ -585,9 +585,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
]
|
||||
|
||||
assert StatusView.build_tags(object_tags) == [
|
||||
%{name: "fediverse", url: "/tag/fediverse"},
|
||||
%{name: "mastodon", url: "/tag/mastodon"},
|
||||
%{name: "nextcloud", url: "/tag/nextcloud"}
|
||||
%{name: "fediverse", url: "http://localhost:4001/tag/fediverse"},
|
||||
%{name: "mastodon", url: "http://localhost:4001/tag/mastodon"},
|
||||
%{name: "nextcloud", url: "http://localhost:4001/tag/nextcloud"}
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue