NoteHandlingTest: Replies go on an object, not an activity.
This commit is contained in:
parent
73b446bb07
commit
4c537534ad
1 changed files with 3 additions and 2 deletions
|
|
@ -698,9 +698,10 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier.NoteHandlingTest do
|
||||||
|
|
||||||
test "still provides reply collection id even if activity doesn't have replies yet" do
|
test "still provides reply collection id even if activity doesn't have replies yet" do
|
||||||
data = Jason.decode!(File.read!("test/fixtures/mastodon-post-activity.json"))
|
data = Jason.decode!(File.read!("test/fixtures/mastodon-post-activity.json"))
|
||||||
modified = Transmogrifier.set_replies(data)
|
object = data["object"] |> Map.delete("replies")
|
||||||
|
modified = Transmogrifier.set_replies(object)
|
||||||
|
|
||||||
refute data["replies"]
|
refute object["replies"]
|
||||||
assert modified["replies"]
|
assert modified["replies"]
|
||||||
assert match?(%{"id" => "http" <> _, "totalItems" => 0}, modified["replies"])
|
assert match?(%{"id" => "http" <> _, "totalItems" => 0}, modified["replies"])
|
||||||
# first page should be omitted if there are no entries anyway
|
# first page should be omitted if there are no entries anyway
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue