summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-05-19 08:06:23 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2018-05-19 03:28:30 -0500
commit19c96c8a19aece5419bc0be5ea3e2945887828b7 (patch)
tree10654af0982dd12ca066b2fffa83bf553bff8772 /test
parent2051530868720a23715cbb0d1a1286a6ae1a6507 (diff)
downloadpleroma-19c96c8a19aece5419bc0be5ea3e2945887828b7.tar.gz
pleroma-19c96c8a19aece5419bc0be5ea3e2945887828b7.zip
tests: add tests for Transmogrifier.maybe_fix_user_object()
Diffstat (limited to 'test')
-rw-r--r--test/web/activity_pub/transmogrifier_test.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/web/activity_pub/transmogrifier_test.exs b/test/web/activity_pub/transmogrifier_test.exs
index a3408da9d..b02d80cce 100644
--- a/test/web/activity_pub/transmogrifier_test.exs
+++ b/test/web/activity_pub/transmogrifier_test.exs
@@ -420,4 +420,15 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
assert Repo.get(WebsubClientSubscription, ws2.id)
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