summaryrefslogtreecommitdiff
path: root/test/web/mastodon_api/views
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2020-04-07 14:09:43 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2020-04-07 14:09:43 +0300
commit2b7d7bbd2dc3121488592a958c29ba6a418e0104 (patch)
treed4d963f9cc8afeae63a7666acab78eae8a8a8c43 /test/web/mastodon_api/views
parentdbcfac11b45b367185a3b18a2db3e3fb07e8f20d (diff)
parent1d4ab06505ec5143dbb1d78d718fa9efd1497751 (diff)
downloadpleroma-2b7d7bbd2dc3121488592a958c29ba6a418e0104.tar.gz
pleroma-2b7d7bbd2dc3121488592a958c29ba6a418e0104.zip
Merge branch 'develop' into issue/1276
Diffstat (limited to 'test/web/mastodon_api/views')
-rw-r--r--test/web/mastodon_api/views/account_view_test.exs3
-rw-r--r--test/web/mastodon_api/views/notification_view_test.exs2
2 files changed, 4 insertions, 1 deletions
diff --git a/test/web/mastodon_api/views/account_view_test.exs b/test/web/mastodon_api/views/account_view_test.exs
index 8d00e3c21..4435f69ff 100644
--- a/test/web/mastodon_api/views/account_view_test.exs
+++ b/test/web/mastodon_api/views/account_view_test.exs
@@ -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 %{
diff --git a/test/web/mastodon_api/views/notification_view_test.exs b/test/web/mastodon_api/views/notification_view_test.exs
index 81eefd735..c3ec9dfec 100644
--- a/test/web/mastodon_api/views/notification_view_test.exs
+++ b/test/web/mastodon_api/views/notification_view_test.exs
@@ -54,7 +54,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationViewTest do
user = insert(:user)
another_user = insert(:user)
{:ok, create_activity} = CommonAPI.post(user, %{"status" => "hey"})
- {:ok, favorite_activity, _object} = CommonAPI.favorite(create_activity.id, another_user)
+ {:ok, favorite_activity} = CommonAPI.favorite(another_user, create_activity.id)
{:ok, [notification]} = Notification.create_notifications(favorite_activity)
create_activity = Activity.get_by_id(create_activity.id)