From 37e5014d3ee571622d324cdadfc2bf7c345cc1fc Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 27 Mar 2018 18:18:24 +0200 Subject: Reduce OP fetching queries. --- test/web/mastodon_api/status_view_test.exs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/web/mastodon_api/status_view_test.exs') 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 -- cgit v1.2.3