Support TLD wildcards in MRF matches
[akkoma] / test / pleroma / web / activity_pub / object_validators / article_note_page_validator_test.exs
index 5b95ebc51f61877867ad1b76bd3327a4e85b9897..62ac5e0510ff3f32afbe1bed6997ab4ed13e9811 100644 (file)
@@ -39,6 +39,20 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest
       %{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
     end
 
+    test "a note with a language validates" do
+      insert(:user, %{ap_id: "https://mastodon.social/users/akkoma_ap_integration_tester"})
+      note = File.read!("test/fixtures/mastodon/note_with_language.json") |> Jason.decode!()
+
+      %{
+        valid?: true,
+        changes: %{
+          contentMap: %{
+            "ja" => "<p>tag</p>"
+          }
+        }
+      } = ArticleNotePageValidator.cast_and_validate(note)
+    end
+
     test "a note from factory validates" do
       note = insert(:note)
       %{valid?: true} = ArticleNotePageValidator.cast_and_validate(note.data)