Add spec for AccountController.statuses

This commit is contained in:
Egor Kislitsyn 2020-04-08 22:33:25 +04:00
commit 03124c96cc
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805
14 changed files with 444 additions and 45 deletions

View file

@ -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