summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorS4KH <kh.syerikjan@gmail.com>2016-10-25 11:22:55 +0800
committerJoram Wilander <jwawilander@gmail.com>2016-10-24 23:22:55 -0400
commit57eb69927c3f990326e13888e40f0feb740a4e19 (patch)
treee18d2e14280a64e34ac25747242810c27a13b02e /model
parent9071553165cfc9f073f57aab96a3e6a7c771c8f3 (diff)
downloadchat-57eb69927c3f990326e13888e40f0feb740a4e19.tar.gz
chat-57eb69927c3f990326e13888e40f0feb740a4e19.tar.bz2
chat-57eb69927c3f990326e13888e40f0feb740a4e19.zip
Changed constants name MIN_TEAM_LENGTH value to 2 and the error message (#4149)
Diffstat (limited to 'model')
-rw-r--r--model/team.go2
-rw-r--r--model/team_test.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/model/team.go b/model/team.go
index 38feda325..d54a809f4 100644
--- a/model/team.go
+++ b/model/team.go
@@ -188,7 +188,7 @@ func IsValidTeamName(s string) bool {
return false
}
- if len(s) <= 3 {
+ if len(s) <= 1 {
return false
}
diff --git a/model/team_test.go b/model/team_test.go
index eb7e27b0e..d471bbf49 100644
--- a/model/team_test.go
+++ b/model/team_test.go
@@ -84,11 +84,11 @@ var domains = []struct {
{"spin-punch-", false},
{"spin_punch", false},
{"a", false},
- {"aa", false},
- {"aaa", false},
+ {"aa", true},
+ {"aaa", true},
{"aaa-999b", true},
{"b00b", true},
- {"b))b", false},
+ {"b)", false},
{"test", true},
}