Refactor all tests that acessed the embeded object
This commit is contained in:
parent
c3a2052806
commit
ff8d76c670
7 changed files with 14 additions and 21 deletions
|
|
@ -2791,9 +2791,9 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|
|||
|
||||
assert %{"content" => "xD", "id" => id} = json_response(conn1, 200)
|
||||
|
||||
activity = Activity.get_by_id(id)
|
||||
activity = Activity.get_by_id_with_object(id)
|
||||
|
||||
assert activity.data["object"]["inReplyTo"] == replied_to.data["object"]["id"]
|
||||
assert Object.normalize(activity).data["inReplyTo"] == Object.normalize(replied_to).data["id"]
|
||||
assert Activity.get_in_reply_to_activity(activity).id == replied_to.id
|
||||
|
||||
# Reblog from the third user
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusViewTest do
|
|||
|> Map.put("content", nil)
|
||||
|
||||
Object.change(note_object, %{data: data})
|
||||
|> Repo.update()
|
||||
|> Object.update_and_set_cache()
|
||||
|
||||
User.get_cached_by_ap_id(note.data["actor"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue