X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fweb%2Fmastodon_api%2Fviews%2Fstatus_view_test.exs;h=5cbadf0fcc6703e856916df95c1d074328dd45eb;hb=fd5e797379155e5a85deb88dc79f8fbca483948e;hp=ffad65b01eb6c77fa58058dd23db3292875c9def;hpb=7803a85d2ced092fbd8e0f1bde0944bd27f8d649;p=akkoma diff --git a/test/web/mastodon_api/views/status_view_test.exs b/test/web/mastodon_api/views/status_view_test.exs index ffad65b01..5cbadf0fc 100644 --- a/test/web/mastodon_api/views/status_view_test.exs +++ b/test/web/mastodon_api/views/status_view_test.exs @@ -442,7 +442,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do user = insert(:user) activity = insert(:note_activity) - {:ok, reblog, _} = CommonAPI.repeat(activity.id, user) + {:ok, reblog} = CommonAPI.repeat(activity.id, user) represented = StatusView.render("show.json", %{for: user, activity: reblog}) @@ -576,7 +576,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do end end - test "embeds a relationship in the account" do + test "does not embed a relationship in the account" do user = insert(:user) other_user = insert(:user) @@ -587,13 +587,11 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do result = StatusView.render("show.json", %{activity: activity, for: other_user}) - assert result[:account][:pleroma][:relationship] == - AccountView.render("relationship.json", %{user: other_user, target: user}) - + assert result[:account][:pleroma][:relationship] == %{} assert_schema(result, "Status", Pleroma.Web.ApiSpec.spec()) end - test "embeds a relationship in the account in reposts" do + test "does not embed a relationship in the account in reposts" do user = insert(:user) other_user = insert(:user) @@ -602,16 +600,12 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do status: "˙˙ɐʎns" }) - {:ok, activity, _object} = CommonAPI.repeat(activity.id, other_user) + {:ok, activity} = CommonAPI.repeat(activity.id, other_user) result = StatusView.render("show.json", %{activity: activity, for: user}) - assert result[:account][:pleroma][:relationship] == - AccountView.render("relationship.json", %{user: user, target: other_user}) - - assert result[:reblog][:account][:pleroma][:relationship] == - AccountView.render("relationship.json", %{user: user, target: user}) - + assert result[:account][:pleroma][:relationship] == %{} + assert result[:reblog][:account][:pleroma][:relationship] == %{} assert_schema(result, "Status", Pleroma.Web.ApiSpec.spec()) end @@ -626,14 +620,4 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do assert status.visibility == "list" end - - test "successfully renders a Listen activity (pleroma extension)" do - listen_activity = insert(:listen) - - status = StatusView.render("listen.json", activity: listen_activity) - - assert status.length == listen_activity.data["object"]["length"] - assert status.title == listen_activity.data["object"]["title"] - assert_schema(status, "Status", Pleroma.Web.ApiSpec.spec()) - end end