diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-05-05 16:08:44 +0300 |
---|---|---|
committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-05-05 16:18:56 +0300 |
commit | e7d8ab8303cb69682a75c30a356572a75deb9837 (patch) | |
tree | d7ad0369a75bb6191cc0e2d76a7110f5895a4641 /test | |
parent | b1c29e2de8a02ef3093387c1454d290a92fbdef8 (diff) | |
download | pleroma-e7d8ab8303cb69682a75c30a356572a75deb9837.tar.gz |
admin_api fetch status by id
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) |