Fix TransmogrifierTest
This commit is contained in:
parent
8b98a98dfb
commit
8596f92654
@ -123,7 +123,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
|||||||
assert activity.data["context"] == object.data["context"]
|
assert activity.data["context"] == object.data["context"]
|
||||||
end
|
end
|
||||||
|
|
||||||
test "it drops link tags" do
|
test "it keeps link tags" do
|
||||||
insert(:user, ap_id: "https://example.org/users/alice")
|
insert(:user, ap_id: "https://example.org/users/alice")
|
||||||
|
|
||||||
message = File.read!("test/fixtures/fep-e232.json") |> Jason.decode!()
|
message = File.read!("test/fixtures/fep-e232.json") |> Jason.decode!()
|
||||||
@ -131,10 +131,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
|
|||||||
assert {:ok, activity} = Transmogrifier.handle_incoming(message)
|
assert {:ok, activity} = Transmogrifier.handle_incoming(message)
|
||||||
|
|
||||||
object = Object.normalize(activity)
|
object = Object.normalize(activity)
|
||||||
assert length(object.data["tag"]) == 1
|
assert [%{"type" => "Mention"}, %{"type" => "Link"}] = object.data["tag"]
|
||||||
|
|
||||||
tag = object.data["tag"] |> List.first()
|
|
||||||
assert tag["type"] == "Mention"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "it accepts quote posts" do
|
test "it accepts quote posts" do
|
||||||
|
Loading…
Reference in New Issue
Block a user