diff options
author | lain <lain@soykaf.club> | 2018-03-27 18:18:24 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2018-03-27 18:18:24 +0200 |
commit | 37e5014d3ee571622d324cdadfc2bf7c345cc1fc (patch) | |
tree | 833c5a5caed5b2f30b527aca309d34f90909a20c /test | |
parent | ff7afe46b9b08fc59ea1451add167f0856d15dbf (diff) | |
download | pleroma-37e5014d3ee571622d324cdadfc2bf7c345cc1fc.tar.gz pleroma-37e5014d3ee571622d324cdadfc2bf7c345cc1fc.zip |
Reduce OP fetching queries.
Diffstat (limited to 'test')
-rw-r--r-- | test/web/mastodon_api/status_view_test.exs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/web/mastodon_api/status_view_test.exs b/test/web/mastodon_api/status_view_test.exs index b08127639..74f5b7133 100644 --- a/test/web/mastodon_api/status_view_test.exs +++ b/test/web/mastodon_api/status_view_test.exs @@ -59,7 +59,13 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do user = insert(:user) {:ok, activity} = CommonAPI.post(user, %{"status" => "he", "in_reply_to_status_id" => note.id}) - assert activity.data["object"]["inReplyTo"] == note.data["object"]["id"] + status = StatusView.render("status.json", %{activity: activity}) + + assert status.in_reply_to_id == note.id + + [status] = StatusView.render("index.json", %{activities: [activity], as: :activity}) + + assert status.in_reply_to_id == note.id end test "contains mentions" do |