diff options
| author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-08 23:16:20 +0400 | 
|---|---|---|
| committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-04-13 18:17:07 +0400 | 
| commit | bd6e2b300f82e66afb121c2339c3cbbfb0b1a446 (patch) | |
| tree | 001c4b4b1e039ee0f644a47d14820008a49e0bd8 /test | |
| parent | 03124c96cc192ef8c4893738a0cee552c6984da6 (diff) | |
| download | pleroma-bd6e2b300f82e66afb121c2339c3cbbfb0b1a446.tar.gz pleroma-bd6e2b300f82e66afb121c2339c3cbbfb0b1a446.zip  | |
Add spec for AccountController.followers
Diffstat (limited to 'test')
| -rw-r--r-- | test/web/mastodon_api/controllers/account_controller_test.exs | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/test/web/mastodon_api/controllers/account_controller_test.exs b/test/web/mastodon_api/controllers/account_controller_test.exs index 969256fa4..79b3adc69 100644 --- a/test/web/mastodon_api/controllers/account_controller_test.exs +++ b/test/web/mastodon_api/controllers/account_controller_test.exs @@ -513,6 +513,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do        assert [%{"id" => id}] = json_response(conn, 200)        assert id == to_string(user.id) +      assert_schema(json_response(conn, 200), "AccountsResponse", ApiSpec.spec())      end      test "getting followers, hide_followers", %{user: user, conn: conn} do @@ -536,6 +537,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do          |> get("/api/v1/accounts/#{other_user.id}/followers")        refute [] == json_response(conn, 200) +      assert_schema(json_response(conn, 200), "AccountsResponse", ApiSpec.spec())      end      test "getting followers, pagination", %{user: user, conn: conn} do @@ -551,6 +553,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do        assert [%{"id" => id3}, %{"id" => id2}] = json_response(res_conn, 200)        assert id3 == follower3.id        assert id2 == follower2.id +      assert_schema(json_response(res_conn, 200), "AccountsResponse", ApiSpec.spec())        res_conn = get(conn, "/api/v1/accounts/#{user.id}/followers?max_id=#{follower3.id}") @@ -566,6 +569,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountControllerTest do        assert [link_header] = get_resp_header(res_conn, "link")        assert link_header =~ ~r/min_id=#{follower2.id}/        assert link_header =~ ~r/max_id=#{follower2.id}/ +      assert_schema(json_response(res_conn, 200), "AccountsResponse", ApiSpec.spec())      end    end  | 
