aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-08-13 22:40:13 +0000
committerrinpatch <rinpatch@sdf.org>2019-08-13 22:40:13 +0000
commit83a3de8cc4edc6992bbc334cda57de13caa971b0 (patch)
tree9a3a30ce0ea4c79d5d0dea02441824b6cb8c8256 /test
parent47c20ab79635257f4a8dcd9886821d10276516a3 (diff)
parentbbd9ed02576f1599e90f8575573fe6e935d32eae (diff)
downloadpleroma-83a3de8cc4edc6992bbc334cda57de13caa971b0.tar.gz
Merge branch 'length-limit-bio' into 'develop'
Add configurable length limits for `User.bio` and `User.name` See merge request pleroma/pleroma!1515
Diffstat (limited to 'test')
-rw-r--r--test/user_test.exs5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/user_test.exs b/test/user_test.exs
index 8440d456d..b363b322c 100644
--- a/test/user_test.exs
+++ b/test/user_test.exs
@@ -525,7 +525,10 @@ defmodule Pleroma.UserTest do
end
test "it restricts some sizes" do
- [bio: 5000, name: 100]
+ bio_limit = Pleroma.Config.get([:instance, :user_bio_length], 5000)
+ name_limit = Pleroma.Config.get([:instance, :user_name_length], 100)
+
+ [bio: bio_limit, name: name_limit]
|> Enum.each(fn {field, size} ->
string = String.pad_leading(".", size)
cs = User.remote_user_creation(Map.put(@valid_remote, field, string))