Move account_lists test to MastodonAPI.AccountControllerTest

This commit is contained in:
Egor Kislitsyn 2019-09-30 14:43:54 +07:00
parent 38db4878a4
commit 122cc050ab
No known key found for this signature in database
GPG key ID: 1B49CB15B71E7805

View file

@ -1082,23 +1082,6 @@ test "redirect to root page", %{conn: conn} do
end end
end end
describe "GET /api/v1/accounts/:id/lists - account_lists" do
test "returns lists to which the account belongs", %{conn: conn} do
user = insert(:user)
other_user = insert(:user)
assert {:ok, %Pleroma.List{} = list} = Pleroma.List.create("Test List", user)
{:ok, %{following: _following}} = Pleroma.List.follow(list, other_user)
res =
conn
|> assign(:user, user)
|> get("/api/v1/accounts/#{other_user.id}/lists")
|> json_response(200)
assert res == [%{"id" => to_string(list.id), "title" => "Test List"}]
end
end
describe "empty_array, stubs for mastodon api" do describe "empty_array, stubs for mastodon api" do
test "GET /api/v1/accounts/:id/identity_proofs", %{conn: conn} do test "GET /api/v1/accounts/:id/identity_proofs", %{conn: conn} do
user = insert(:user) user = insert(:user)