diff options
author | lain <lain@soykaf.club> | 2020-05-05 13:40:12 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-05 13:40:12 +0000 |
commit | 42a2acac46602d25e7b63042990dfa56eee25b76 (patch) | |
tree | f4cfbe6443880662d17685e0da605fb274b2d671 /test | |
parent | 33f29760200e00305be20350898ebfd2b3ce21af (diff) | |
parent | e7d8ab8303cb69682a75c30a356572a75deb9837 (diff) | |
download | pleroma-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.exs | 19 |
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) |