forked from AkkomaGang/akkoma
Web.ActivityPub.ActivityPubTest: test against inserting activities with content: null
This commit is contained in:
parent
15aa45ae8a
commit
499a4591a4
1 changed files with 11 additions and 0 deletions
|
@ -85,6 +85,17 @@ test "drops activities beyond a certain limit" do
|
||||||
assert {:error, {:remote_limit_error, _}} = ActivityPub.insert(data)
|
assert {:error, {:remote_limit_error, _}} = ActivityPub.insert(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "doesn't drop activities with content being null" do
|
||||||
|
data = %{
|
||||||
|
"ok" => true,
|
||||||
|
"object" => %{
|
||||||
|
"content" => nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert {:ok, _} = ActivityPub.insert(data)
|
||||||
|
end
|
||||||
|
|
||||||
test "returns the activity if one with the same id is already in" do
|
test "returns the activity if one with the same id is already in" do
|
||||||
activity = insert(:note_activity)
|
activity = insert(:note_activity)
|
||||||
{:ok, new_activity} = ActivityPub.insert(activity.data)
|
{:ok, new_activity} = ActivityPub.insert(activity.data)
|
||||||
|
|
Loading…
Reference in a new issue