From daff85a985c165c73fda3fcd20a3f46c76d36e6d Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Mon, 8 Jul 2019 19:53:02 +0300 Subject: [#878] Refactored assumptions on embedded object presence in tests. Adjusted note factory to not embed object into activity. --- test/web/common_api/common_api_test.exs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/web/common_api/common_api_test.exs') diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs index 6f57bbe1f..958c931c4 100644 --- a/test/web/common_api/common_api_test.exs +++ b/test/web/common_api/common_api_test.exs @@ -34,7 +34,7 @@ defmodule Pleroma.Web.CommonAPITest do user = insert(:user) {:ok, activity} = CommonAPI.post(user, %{"status" => "#2hu #2HU"}) - object = Object.normalize(activity.data["object"]) + object = Object.normalize(activity) assert object.data["tag"] == ["2hu"] end @@ -87,7 +87,7 @@ defmodule Pleroma.Web.CommonAPITest do "content_type" => "text/html" }) - object = Object.normalize(activity.data["object"]) + object = Object.normalize(activity) assert object.data["content"] == "

2hu

alert('xss')" end @@ -103,7 +103,7 @@ defmodule Pleroma.Web.CommonAPITest do "content_type" => "text/markdown" }) - object = Object.normalize(activity.data["object"]) + object = Object.normalize(activity) assert object.data["content"] == "

2hu

alert('xss')" end -- cgit v1.2.3