mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-25 02:19:31 +00:00
tests: add tests for Transmogrifier.maybe_fix_user_object()
This commit is contained in:
parent
2051530868
commit
19c96c8a19
|
@ -420,4 +420,15 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
||||||
assert Repo.get(WebsubClientSubscription, ws2.id)
|
assert Repo.get(WebsubClientSubscription, ws2.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe "actor rewriting" do
|
||||||
|
test "it fixes the actor URL property to be a proper URI" do
|
||||||
|
data = %{
|
||||||
|
"url" => %{"href" => "http://example.com"}
|
||||||
|
}
|
||||||
|
|
||||||
|
rewritten = Transmogrifier.maybe_fix_user_object(data)
|
||||||
|
assert rewritten["url"] == "http://example.com"
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue