diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-08 22:33:25 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-13 18:17:07 +0400 |
commit | 03124c96cc192ef8c4893738a0cee552c6984da6 (patch) | |
tree | cddd70ce07a6d11d4bb2d95e57ebe90a6f02637b /test/web/api_spec/account_operation_test.exs | |
parent | 278b3fa0ad0ca58a9e5549e98d24944bbe0bf766 (diff) | |
download | pleroma-03124c96cc192ef8c4893738a0cee552c6984da6.tar.gz pleroma-03124c96cc192ef8c4893738a0cee552c6984da6.zip |
Add spec for AccountController.statuses
Diffstat (limited to 'test/web/api_spec/account_operation_test.exs')
-rw-r--r-- | test/web/api_spec/account_operation_test.exs | 16 |
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 |