summaryrefslogtreecommitdiff
path: root/test/web/api_spec/account_operation_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/web/api_spec/account_operation_test.exs')
-rw-r--r--test/web/api_spec/account_operation_test.exs16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/web/api_spec/account_operation_test.exs b/test/web/api_spec/account_operation_test.exs
index 6cc08ee0e..892ade71c 100644
--- a/test/web/api_spec/account_operation_test.exs
+++ b/test/web/api_spec/account_operation_test.exs
@@ -122,4 +122,20 @@ defmodule Pleroma.Web.ApiSpec.AccountOperationTest do
assert_schema(resp, "Account", api_spec)
end
+
+ test "/api/v1/accounts/:id/statuses produces StatusesResponse", %{
+ conn: conn
+ } do
+ user = insert(:user)
+ Pleroma.Web.CommonAPI.post(user, %{"status" => "foobar"})
+
+ api_spec = ApiSpec.spec()
+
+ assert resp =
+ conn
+ |> get("/api/v1/accounts/#{user.id}/statuses")
+ |> json_response(:ok)
+
+ assert_schema(resp, "StatusesResponse", api_spec)
+ end
end