Fix ArticleNotePageValidatorTest

This commit is contained in:
tusooa 2022-11-07 11:49:50 -05:00
parent cec18e7ba3
commit 5b302d8b76
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224

View file

@ -30,12 +30,12 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.ArticleNotePageValidatorTest
end
test "a basic note validates", %{note: note} do
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note, [])
end
test "a note from factory validates" do
note = insert(:note)
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note.data)
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note.data, [])
end
end
@ -90,7 +90,7 @@ test "a Note from Roadhouse validates" do
|> File.read!()
|> Jason.decode!()
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note, [])
end
test "a note with an attachment should work", _ do
@ -101,7 +101,7 @@ test "a note with an attachment should work", _ do
|> File.read!()
|> Jason.decode!()
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note, [])
end
test "a Note without replies/first/items validates" do
@ -114,6 +114,6 @@ test "a Note without replies/first/items validates" do
|> pop_in(["replies", "first", "items"])
|> elem(1)
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note)
%{valid?: true} = ArticleNotePageValidator.cast_and_validate(note, [])
end
end