[#2323] Fixed a typo causing /accounts/relationships to render default relationships. Improved the tests.

This commit is contained in:
Ivan Tashkinov 2020-04-02 19:23:30 +03:00
commit aa78325117
4 changed files with 15 additions and 8 deletions

View file

@ -209,6 +209,9 @@ defmodule Pleroma.Web.MastodonAPI.AccountViewTest do
relationships_opt = UserRelationship.view_relationships_option(user, [other_user])
opts = Map.put(opts, :relationships, relationships_opt)
assert expected_result == AccountView.render("relationship.json", opts)
assert [expected_result] ==
AccountView.render("relationships.json", %{user: user, targets: [other_user]})
end
@blank_response %{