diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-04-18 17:37:25 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-04-18 17:37:25 -0400 |
commit | 5398c82e1b80c3160974e01afabbfd1c2a2420a7 (patch) | |
tree | 74c9e48dcfe1c49b8225becb0daf4817d46f4edb /model/user_test.go | |
parent | 86c7e7cacd0608648ac65ff32d21b948c7527715 (diff) | |
download | chat-5398c82e1b80c3160974e01afabbfd1c2a2420a7.tar.gz chat-5398c82e1b80c3160974e01afabbfd1c2a2420a7.tar.bz2 chat-5398c82e1b80c3160974e01afabbfd1c2a2420a7.zip |
Revert "Usernames must start with a letter (#5581)"
This reverts commit 2e911b77c3386833f8f0cea82c7b6b3e5583a08e.
Diffstat (limited to 'model/user_test.go')
-rw-r--r-- | model/user_test.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/model/user_test.go b/model/user_test.go index 3eb931f5d..fc153248f 100644 --- a/model/user_test.go +++ b/model/user_test.go @@ -97,9 +97,9 @@ func TestUserIsValid(t *testing.T) { t.Fatal() } - user.Username = "n" + NewId() - user.Email = strings.Repeat("a", 129) - if err := user.IsValid(); !HasExpectedUserIsValidError(err, "email", user.Id) { + user.Username = NewId() + user.Email = strings.Repeat("01234567890", 20) + if err := user.IsValid(); err == nil { t.Fatal() } @@ -204,9 +204,9 @@ var usernames = []struct { {"spin-punch", true}, {"sp", true}, {"s", true}, - {"1spin-punch", false}, - {"-spin-punch", false}, - {".spin-punch", false}, + {"1spin-punch", true}, + {"-spin-punch", true}, + {".spin-punch", true}, {"Spin-punch", false}, {"spin punch-", false}, {"spin_punch", true}, |