projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into features/federation...
[akkoma]
/
test
/
pleroma
/
web
/
admin_api
/
controllers
/
report_controller_test.exs
diff --git
a/test/pleroma/web/admin_api/controllers/report_controller_test.exs
b/test/pleroma/web/admin_api/controllers/report_controller_test.exs
index fa746d6eaff0f3f6433e75deec80cf5e2f4ac6d8..958e1d3ab87494debecb626a218ce9ac36c498ae 100644
(file)
--- a/
test/pleroma/web/admin_api/controllers/report_controller_test.exs
+++ b/
test/pleroma/web/admin_api/controllers/report_controller_test.exs
@@
-37,12
+37,21
@@
defmodule Pleroma.Web.AdminAPI.ReportControllerTest do
status_ids: [activity.id]
})
status_ids: [activity.id]
})
+ conn
+ |> put_req_header("content-type", "application/json")
+ |> post("/api/pleroma/admin/reports/#{report_id}/notes", %{
+ content: "this is an admin note"
+ })
+
response =
conn
|> get("/api/pleroma/admin/reports/#{report_id}")
|> json_response_and_validate_schema(:ok)
assert response["id"] == report_id
response =
conn
|> get("/api/pleroma/admin/reports/#{report_id}")
|> json_response_and_validate_schema(:ok)
assert response["id"] == report_id
+
+ [notes] = response["notes"]
+ assert notes["content"] == "this is an admin note"
end
test "returns 404 when report id is invalid", %{conn: conn} do
end
test "returns 404 when report id is invalid", %{conn: conn} do