Add test for broken owncast federation

This commit is contained in:
FloatingGhost 2022-07-01 11:44:45 +01:00 committed by Haelwenn (lanodan) Monnier
commit 09e0304b9c
2 changed files with 42 additions and 0 deletions

View file

@ -43,4 +43,15 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
end
test "a note with an attachment should work", _ do
insert(:user, %{ap_id: "https://owncast.localhost.localdomain/federation/user/streamer"})
note =
"test/fixtures/owncast-note-with-attachment.json"
|> File.read!()
|> Jason.decode!()
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
end
end