[WIP] Test transmogrifier

Introduce MobilizonWeb.API namespace

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Format

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

WIP

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

remove unneeded code

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Fix tests

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Fix warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2018-12-14 17:41:55 +01:00
parent e3a8343112
commit c1e6612405
41 changed files with 2961 additions and 246 deletions

View File

@@ -78,7 +78,30 @@ defmodule Mobilizon.Service.Activitypub.ActivitypubTest do
"https://social.tcit.fr/users/tcit/statuses/99908779444618462"
)
assert object == object_again
assert object.id == object_again.id
end
end
test "object reply by url" do
use_cassette "activity_pub/fetch_social_tcit_fr_reply" do
{:ok, object} =
ActivityPub.fetch_object_from_url(
"https://social.tcit.fr/users/tcit/statuses/101160654038714030"
)
assert object.in_reply_to_comment.url ==
"https://social.tcit.fr/users/tcit/statuses/101160195754333819"
end
end
test "object reply to a video by url" do
use_cassette "activity_pub/fetch_reply_to_framatube" do
{:ok, object} =
ActivityPub.fetch_object_from_url(
"https://framapiaf.org/@troisiemelobe/101156292125317651"
)
assert object.in_reply_to_comment == nil
end
end
end