projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add configurable length limits for `User.bio` and `User.name`
[akkoma]
/
test
/
user_test.exs
diff --git
a/test/user_test.exs
b/test/user_test.exs
index 556df45fd0f75a14276d8df6ddb54eb2207a0e14..dfa91a106396cf43911a39e172478abe74e92d19 100644
(file)
--- 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
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))
|> Enum.each(fn {field, size} ->
string = String.pad_leading(".", size)
cs = User.remote_user_creation(Map.put(@valid_remote, field, string))