summaryrefslogtreecommitdiff
path: root/test/web/common_api/common_api_test.exs
diff options
context:
space:
mode:
authorAlexander Strizhakov <alex.strizhakov@gmail.com>2020-03-12 18:31:10 +0300
committerAlexander Strizhakov <alex.strizhakov@gmail.com>2020-03-12 18:31:10 +0300
commit39ed608b13f9204e0503311c7394934b01501ab8 (patch)
tree34250ed1c719224a3522fd1a841bbd0a360e1245 /test/web/common_api/common_api_test.exs
parent1306b92997dc6e76e5d617d529dbc229d5aee200 (diff)
parent00d17520314e3591caaa7ab4ca39c6227a6bdf15 (diff)
downloadpleroma-39ed608b13f9204e0503311c7394934b01501ab8.tar.gz
pleroma-39ed608b13f9204e0503311c7394934b01501ab8.zip
Merge branch 'develop' into gun
Diffstat (limited to 'test/web/common_api/common_api_test.exs')
-rw-r--r--test/web/common_api/common_api_test.exs4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/web/common_api/common_api_test.exs b/test/web/common_api/common_api_test.exs
index 299d968db..b80523160 100644
--- a/test/web/common_api/common_api_test.exs
+++ b/test/web/common_api/common_api_test.exs
@@ -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