diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2019-08-01 15:53:37 +0700 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2019-08-01 15:53:37 +0700 |
commit | 9ca45063556f3b75860d516577776a00536e90a8 (patch) | |
tree | 672d0df56960ef191e3430642b597a36459de1f4 /test | |
parent | cdfd02e90455fe7c01026efb48af3194cc82252b (diff) | |
download | pleroma-9ca45063556f3b75860d516577776a00536e90a8.tar.gz |
Add configurable length limits for `User.bio` and `User.name`
Diffstat (limited to 'test')
-rw-r--r-- | test/user_test.exs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/user_test.exs b/test/user_test.exs index 556df45fd..dfa91a106 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)) |