diff options
author | rinpatch <rinpatch@sdf.org> | 2019-07-09 20:00:37 +0000 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-07-09 20:00:37 +0000 |
commit | 81f1017b84bbe1a493aaf6f43687af2f2546b6a1 (patch) | |
tree | bb2d77d97f46f51c7d3b3e719fe29faac41432af /test/web/twitter_api/views | |
parent | 2bb945cb70751bc8e72c036040130bb54c32f391 (diff) | |
parent | 8a41d34673532c03cf99a2334399b9436e245f1b (diff) | |
download | pleroma-81f1017b84bbe1a493aaf6f43687af2f2546b6a1.tar.gz pleroma-81f1017b84bbe1a493aaf6f43687af2f2546b6a1.zip |
Merge branch '878-activity-object-decoupling-in-tests' into 'develop'
[#878] Refactored assumptions on embedded object presence in tests
Closes #878
See merge request pleroma/pleroma!1390
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) } |