diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2023-12-28 15:52:59 +0100 |
---|---|---|
committer | marcin mikołajczak <git@mkljczk.pl> | 2023-12-28 15:54:16 +0100 |
commit | 51aef6b78dcf709872de32a02533e943f08858d4 (patch) | |
tree | 4bd31c5a451c0d60f12a5890de83dcc0a722c21e /test | |
parent | b6bae2d319bdcb4bb40749141f70b1c3881e4569 (diff) | |
download | pleroma-51aef6b78dcf709872de32a02533e943f08858d4.tar.gz pleroma-51aef6b78dcf709872de32a02533e943f08858d4.zip |
Add language from activity context in ObjectValidator
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'test')
-rw-r--r-- | test/pleroma/web/activity_pub/object_validators/article_note_page_validator_test.exs | 7 |
1 files changed, 2 insertions, 5 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 25e29c878..611d0bcd0 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 @@ -186,12 +186,9 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest "actor" => user.ap_id } - {:ok, object} = - ArticleNotePageValidator.cast_and_apply(note_activity["object"], - activity_data: note_activity - ) + {:ok, _create_activity, meta} = ObjectValidator.validate(note_activity, []) |> IO.inspect() - assert object.language == "pl" + assert meta[:object_data]["language"] == "pl" end test "it detects language from contentMap" do |