Fix ActivityPub test contacting dead server

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-05-18 16:04:01 +02:00
parent 159346d5b5
commit 9f4cc5d981
5 changed files with 41 additions and 45 deletions

View File

@@ -61,8 +61,8 @@ defmodule Mobilizon.Federation.ActivityPubTest do
end
test "object reply by url" do
url = "https://zoltasila.pl/objects/1c295713-8e3c-411e-9e62-57a7b9c9e514"
reply_to_url = "https://framapiaf.org/users/peertube/statuses/104584600044284729"
url = "https://pirateradio.social/notice/A5XnLBsFNQDKtthzM0"
reply_to_url = "https://framapiaf.org/users/peertube/statuses/105945857653893100"
data =
File.read!("test/fixtures/mastodon-status-3.json")

View File

@@ -40,7 +40,7 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier.CommentsTest do
File.read!("test/fixtures/mastodon-post-activity.json")
|> Jason.decode!()
reply_to_url = "https://blob.cat/objects/02fdea3d-932c-4348-9ecb-3f9eb3fbdd94"
reply_to_url = "https://soc.punktrash.club/objects/d811df79-6e54-4f51-841e-0c38bc356467"
object =
data["object"]
@@ -65,11 +65,11 @@ defmodule Mobilizon.Federation.ActivityPub.Transmogrifier.CommentsTest do
%Comment{} =
origin_comment =
Discussions.get_comment_from_url(
"https://blob.cat/objects/02fdea3d-932c-4348-9ecb-3f9eb3fbdd94"
"https://soc.punktrash.club/objects/d811df79-6e54-4f51-841e-0c38bc356467"
)
assert returned_activity.data["object"]["inReplyTo"] ==
"https://blob.cat/objects/02fdea3d-932c-4348-9ecb-3f9eb3fbdd94"
"https://soc.punktrash.club/objects/d811df79-6e54-4f51-841e-0c38bc356467"
assert returned_activity.data["object"]["inReplyTo"] == origin_comment.url
end