Fetch account from report, not from status (it might be deleted)
This commit is contained in:
parent
5135656f57
commit
fcabcab443
3 changed files with 29 additions and 3 deletions
|
|
@ -1755,6 +1755,25 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
|
|||
|
||||
assert length(Enum.filter(response["reports"], &(&1["status"]["deleted"] == false))) == 2
|
||||
end
|
||||
|
||||
test "account not empty if status was deleted", %{
|
||||
conn: conn,
|
||||
first_report: first_report,
|
||||
first_status: first_status,
|
||||
target_user: target_user
|
||||
} do
|
||||
{:ok, _} = CommonAPI.update_report_state(first_report.id, "resolved")
|
||||
{:ok, _} = CommonAPI.delete(first_status.id, target_user)
|
||||
|
||||
refute Activity.get_by_ap_id(first_status.id)
|
||||
|
||||
response =
|
||||
conn
|
||||
|> get("/api/pleroma/admin/grouped_reports")
|
||||
|> json_response(:ok)
|
||||
|
||||
assert Enum.find(response["reports"], &(&1["status"]["deleted"] == true))["account"]
|
||||
end
|
||||
end
|
||||
|
||||
describe "POST /api/pleroma/admin/reports/:id/respond" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue