Fix ArticleNotePageValidatorTest
This commit is contained in:
parent
cec18e7ba3
commit
5b302d8b76
1 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue