summaryrefslogtreecommitdiffstats
path: root/model/user_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/user_test.go')
-rw-r--r--model/user_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/model/user_test.go b/model/user_test.go
index 4f5c16614..542d15e5d 100644
--- a/model/user_test.go
+++ b/model/user_test.go
@@ -95,7 +95,7 @@ func TestUserIsValid(t *testing.T) {
t.Fatal()
}
- user.Username = NewId()
+ user.Username = "n" + NewId()
user.Email = strings.Repeat("01234567890", 20)
if err := user.IsValid(); err == nil {
t.Fatal()
@@ -189,6 +189,10 @@ var usernames = []struct {
expected bool
}{
{"spin-punch", true},
+ {"sp", false},
+ {"1spin-punch", false},
+ {"-spin-punch", false},
+ {".spin-punch", false},
{"Spin-punch", false},
{"spin punch-", false},
{"spin_punch", true},