diff options
author | Ivan Tashkinov <ivant.business@gmail.com> | 2019-07-08 19:53:02 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivant.business@gmail.com> | 2019-07-08 19:53:02 +0300 |
commit | daff85a985c165c73fda3fcd20a3f46c76d36e6d (patch) | |
tree | 22edb1ef324ee2b89f276fb038b415d2c30c7b05 /test/web/common_api/common_api_test.exs | |
parent | 3589b30ddc9d0c23ca6f00264cff05e53be1b270 (diff) | |
download | pleroma-daff85a985c165c73fda3fcd20a3f46c76d36e6d.tar.gz pleroma-daff85a985c165c73fda3fcd20a3f46c76d36e6d.zip |
[#878] Refactored assumptions on embedded object presence in tests. Adjusted note factory to not embed object into activity.
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r-- | test/web/common_api/common_api_test.exs | 6 |
1 files changed, 3 insertions, 3 deletions
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"] == "<p><b>2hu</b></p>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"] == "<p><b>2hu</b></p>alert('xss')" end |