summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-11-03 01:00:12 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-11-03 01:00:12 +0000
commit0d8cc0905aeebb965df0cf755a171d21b01ed978 (patch)
tree70eb61d52bc4eb52be17cd8ab2cf9591e4cf2908 /test
parent0fd2830fe14e73c575f73eeb2ccfaf2bd5a27eba (diff)
parent53dd048590b93da67f9d4abac8cc111424c4d5c0 (diff)
downloadpleroma-0d8cc0905aeebb965df0cf755a171d21b01ed978.tar.gz
pleroma-0d8cc0905aeebb965df0cf755a171d21b01ed978.zip
Merge branch 'fix/get_report_with_notes' into 'develop'
Permit fetching individual reports with notes preloaded See merge request pleroma/pleroma!3118
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/admin_api/controllers/report_controller_test.exs9
1 files changed, 9 insertions, 0 deletions
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 fa746d6ea..958e1d3ab 100644
--- 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]
})
+ 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
+
+ [notes] = response["notes"]
+ assert notes["content"] == "this is an admin note"
end
test "returns 404 when report id is invalid", %{conn: conn} do