diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-07 18:53:12 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-13 18:16:07 +0400 |
commit | 278b3fa0ad0ca58a9e5549e98d24944bbe0bf766 (patch) | |
tree | 7a2605c85259b0c554c8f49a2b6b1387dd309ea4 /test | |
parent | d7d6a83233f24b80005b4f49a8697535620e4b83 (diff) | |
download | pleroma-278b3fa0ad0ca58a9e5549e98d24944bbe0bf766.tar.gz |
Add spec for AccountController.show
Diffstat (limited to 'test')
-rw-r--r-- | test/web/api_spec/account_operation_test.exs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/web/api_spec/account_operation_test.exs b/test/web/api_spec/account_operation_test.exs index 58a38d8af..6cc08ee0e 100644 --- a/test/web/api_spec/account_operation_test.exs +++ b/test/web/api_spec/account_operation_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.ApiSpec.AccountOperationTest do - use Pleroma.Web.ConnCase, async: true + use Pleroma.Web.ConnCase alias Pleroma.Web.ApiSpec alias Pleroma.Web.ApiSpec.Schemas.Account @@ -108,4 +108,18 @@ defmodule Pleroma.Web.ApiSpec.AccountOperationTest do assert_schema([relationship], "AccountRelationshipsResponse", api_spec) end + + test "/api/v1/accounts/:id produces Account", %{ + conn: conn + } do + user = insert(:user) + api_spec = ApiSpec.spec() + + assert resp = + conn + |> get("/api/v1/accounts/#{user.id}") + |> json_response(:ok) + + assert_schema(resp, "Account", api_spec) + end end |