Test that prismo url-map transforms into a string

This commit is contained in:
Haelwenn (lanodan) Monnier 2018-11-01 11:27:22 +01:00
commit c5f26f3ce2
No known key found for this signature in database
GPG key ID: D5B7A8E43C997DEE
2 changed files with 60 additions and 0 deletions

View file

@ -145,6 +145,14 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
assert "test" in data["object"]["tag"]
end
test "it works for incoming notices with url not being a string (prismo)" do
data = File.read!("test/fixtures/prismo-url-map.json") |> Poison.decode!()
{:ok, %Activity{data: data, local: false}} = Transmogrifier.handle_incoming(data)
assert data["object"]["url"] == "https://prismo.news/posts/83"
end
test "it works for incoming follow requests" do
user = insert(:user)