Fix unit tests
This commit is contained in:
parent
0e0c316c76
commit
9d99e76a3a
3 changed files with 35 additions and 21 deletions
|
|
@ -1504,6 +1504,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
reporter_ap_id = reporter.ap_id
|
||||
target_ap_id = target_account.ap_id
|
||||
activity_ap_id = activity.data["id"]
|
||||
object_ap_id = activity.object.data["id"]
|
||||
|
||||
activity_with_object = Activity.get_by_ap_id_with_object(activity_ap_id)
|
||||
|
||||
|
|
@ -1515,6 +1516,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
reported_activity: activity,
|
||||
content: content,
|
||||
activity_ap_id: activity_ap_id,
|
||||
object_ap_id: object_ap_id,
|
||||
activity_with_object: activity_with_object,
|
||||
reporter_ap_id: reporter_ap_id,
|
||||
target_ap_id: target_ap_id
|
||||
|
|
@ -1528,7 +1530,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
target_account: target_account,
|
||||
reported_activity: reported_activity,
|
||||
content: content,
|
||||
activity_ap_id: activity_ap_id,
|
||||
object_ap_id: object_ap_id,
|
||||
activity_with_object: activity_with_object,
|
||||
reporter_ap_id: reporter_ap_id,
|
||||
target_ap_id: target_ap_id
|
||||
|
|
@ -1544,7 +1546,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
|
||||
note_obj = %{
|
||||
"type" => "Note",
|
||||
"id" => activity_ap_id,
|
||||
"id" => object_ap_id,
|
||||
"content" => content,
|
||||
"published" => activity_with_object.object.data["published"],
|
||||
"actor" =>
|
||||
|
|
@ -1568,6 +1570,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
context: context,
|
||||
target_account: target_account,
|
||||
reported_activity: reported_activity,
|
||||
object_ap_id: object_ap_id,
|
||||
content: content
|
||||
},
|
||||
Utils,
|
||||
|
|
@ -1582,8 +1585,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
content: content
|
||||
})
|
||||
|
||||
new_data =
|
||||
put_in(activity.data, ["object"], [target_account.ap_id, reported_activity.data["id"]])
|
||||
new_data = put_in(activity.data, ["object"], [target_account.ap_id, object_ap_id])
|
||||
|
||||
assert_called(Utils.maybe_federate(%{activity | data: new_data}))
|
||||
end
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
|||
|
||||
note_obj = %{
|
||||
"type" => "Note",
|
||||
"id" => activity.data["id"],
|
||||
"id" => activity.object.data["id"],
|
||||
"content" => "test post",
|
||||
"published" => object.data["published"],
|
||||
"actor" => AccountView.render("show.json", %{user: user, skip_visibility_check: true})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue