aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-05 13:40:12 +0000
committerlain <lain@soykaf.club>2020-05-05 13:40:12 +0000
commit42a2acac46602d25e7b63042990dfa56eee25b76 (patch)
treef4cfbe6443880662d17685e0da605fb274b2d671 /test
parent33f29760200e00305be20350898ebfd2b3ce21af (diff)
parente7d8ab8303cb69682a75c30a356572a75deb9837 (diff)
downloadpleroma-42a2acac46602d25e7b63042990dfa56eee25b76.tar.gz
Merge branch 'feature/1720-status-view' into 'develop'
Admin API fetch status by id Closes #1720 See merge request pleroma/pleroma!2475
Diffstat (limited to 'test')
-rw-r--r--test/web/admin_api/admin_api_controller_test.exs19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/web/admin_api/admin_api_controller_test.exs b/test/web/admin_api/admin_api_controller_test.exs
index 1862a9589..c3f3ad051 100644
--- a/test/web/admin_api/admin_api_controller_test.exs
+++ b/test/web/admin_api/admin_api_controller_test.exs
@@ -1620,6 +1620,25 @@ defmodule Pleroma.Web.AdminAPI.AdminAPIControllerTest do
end
end
+ describe "GET /api/pleroma/admin/statuses/:id" do
+ test "not found", %{conn: conn} do
+ assert conn
+ |> get("/api/pleroma/admin/statuses/not_found")
+ |> json_response(:not_found)
+ end
+
+ test "shows activity", %{conn: conn} do
+ activity = insert(:note_activity)
+
+ response =
+ conn
+ |> get("/api/pleroma/admin/statuses/#{activity.id}")
+ |> json_response(200)
+
+ assert response["id"] == activity.id
+ end
+ end
+
describe "PUT /api/pleroma/admin/statuses/:id" do
setup do
activity = insert(:note_activity)