Merge branch 'develop' into gun

This commit is contained in:
Alexander Strizhakov 2020-03-12 18:31:10 +03:00
commit 39ed608b13
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
34 changed files with 457 additions and 90 deletions

View file

@ -202,13 +202,15 @@ defmodule Pleroma.Web.CommonAPITest do
CommonAPI.post(user, %{"status" => ""})
end
test "it returns error when character limit is exceeded" do
test "it validates character limits are correctly enforced" do
Pleroma.Config.put([:instance, :limit], 5)
user = insert(:user)
assert {:error, "The status is over the character limit"} =
CommonAPI.post(user, %{"status" => "foobar"})
assert {:ok, activity} = CommonAPI.post(user, %{"status" => "12345"})
end
test "it can handle activities that expire" do