summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2022-01-22 18:03:22 -0600
committertusooa <tusooa@kazv.moe>2023-09-13 19:19:03 -0400
commit795736af16dca77929725e7dd55f5de04a796fdb (patch)
tree61c4ddf0e66de21d34fcda84ff2520c70b6b61be /test
parent7deda1fa18cb95a588ba66950ac45262c467a7f4 (diff)
downloadpleroma-795736af16dca77929725e7dd55f5de04a796fdb.tar.gz
pleroma-795736af16dca77929725e7dd55f5de04a796fdb.zip
ObjectValidators: improve quoteUrl compatibility
Diffstat (limited to 'test')
-rw-r--r--test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs b/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
index c7a62be18..c3cde00b5 100644
--- a/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
+++ b/test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs
@@ -116,4 +116,24 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
end
+
+ test "Fedibird quote post" do
+ insert(:user, ap_id: "https://fedibird.com/users/noellabo")
+
+ data = File.read!("test/fixtures/quote_post/fedibird_quote_post.json") |> Jason.decode!()
+ chg = ArticleNotePageValidator.cast_and_validate(data)
+
+ assert chg.valid?
+ assert chg.changes.quoteUrl == "https://misskey.io/notes/8vsn2izjwh"
+ end
+
+ test "Misskey quote post" do
+ insert(:user, ap_id: "https://misskey.io/users/7rkrarq81i")
+
+ data = File.read!("test/fixtures/quote_post/misskey_quote_post.json") |> Jason.decode!()
+ chg = ArticleNotePageValidator.cast_and_validate(data)
+
+ assert chg.valid?
+ assert chg.changes.quoteUrl == "https://misskey.io/notes/8vs6wxufd0"
+ end
end