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/twitter_api/views | |
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/twitter_api/views')
-rw-r--r-- | test/web/twitter_api/views/activity_view_test.exs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/web/twitter_api/views/activity_view_test.exs b/test/web/twitter_api/views/activity_view_test.exs index 43bd77f78..56d861efb 100644 --- a/test/web/twitter_api/views/activity_view_test.exs +++ b/test/web/twitter_api/views/activity_view_test.exs @@ -126,7 +126,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do other_user = insert(:user, %{nickname: "shp"}) {:ok, activity} = CommonAPI.post(user, %{"status" => "Hey @shp!", "visibility" => "direct"}) - object = Object.normalize(activity.data["object"]) + object = Object.normalize(activity) result = ActivityView.render("activity.json", activity: activity) @@ -177,7 +177,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do user = insert(:user) other_user = insert(:user, %{nickname: "shp"}) {:ok, activity} = CommonAPI.post(user, %{"status" => "Hey @shp!"}) - object = Object.normalize(activity.data["object"]) + object = Object.normalize(activity) convo_id = Utils.context_to_conversation_id(object.data["context"]) @@ -351,7 +351,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do "is_post_verb" => false, "statusnet_html" => "deleted notice {{tag", "text" => "deleted notice {{tag", - "uri" => delete.data["object"], + "uri" => Object.normalize(delete).data["id"], "user" => UserView.render("show.json", user: user) } |