Fix broken attachments from owncast (#31)
[akkoma] / test / pleroma / web / activity_pub / object_validators / article_note_page_validator_test.exs
index 2bd1e46c131376f719a5c3ede92940c4e99779cf..717a704d407649e0efe21d384953ed0d78902283 100644 (file)
@@ -52,5 +52,16 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest
       %{valid?: true, changes: %{replies: ["https://bookwyrm.com/user/TestUser/status/18"]}} =
         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
 end