Add spec for AccountController.statuses
This commit is contained in:
parent
278b3fa0ad
commit
03124c96cc
14 changed files with 444 additions and 45 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue