diff options
author | 2023-05-25 11:15:10 +0200 | |
---|---|---|
committer | 2023-05-25 11:15:10 +0200 | |
commit | 45f961a9fe65127980e0e12a46ac4ac8f5b5752b (patch) | |
tree | 08d967c4b0b1c8863b9942afb04bfe9da0b66d33 /internal/validate/formvalidation_test.go | |
parent | [feature] Add List functionality (#1802) (diff) | |
download | gotosocial-45f961a9fe65127980e0e12a46ac4ac8f5b5752b.tar.xz |
[bugfix] allow usernames of length 1 (#1823)
Closes https://github.com/superseriousbusiness/gotosocial/issues/1691.
Co-authored-by: decentral1se <cellarspoon@riseup.net>
Diffstat (limited to 'internal/validate/formvalidation_test.go')
-rw-r--r-- | internal/validate/formvalidation_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/validate/formvalidation_test.go b/internal/validate/formvalidation_test.go index 9cfa07700..4dff5b60d 100644 --- a/internal/validate/formvalidation_test.go +++ b/internal/validate/formvalidation_test.go @@ -93,6 +93,7 @@ func (suite *ValidationTestSuite) TestValidateUsername() { trailingSpace := "thisusername_ends_with_a_space " newlines := "this_is\n_almost_ok" goodUsername := "this_is_a_good_username" + singleChar := "s" var err error err = validate.Username(empty) @@ -118,6 +119,9 @@ func (suite *ValidationTestSuite) TestValidateUsername() { err = validate.Username(goodUsername) suite.NoError(err) + + err = validate.Username(singleChar) + suite.NoError(err) } func (suite *ValidationTestSuite) TestValidateEmail() { |