summaryrefslogtreecommitdiffstats
path: root/app/user_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-03-03 12:04:15 -0500
committerChristopher Speller <crspeller@gmail.com>2017-03-03 12:04:15 -0500
commit2e911b77c3386833f8f0cea82c7b6b3e5583a08e (patch)
tree63c515b41e5abf024e94658554a02acaf40710df /app/user_test.go
parent09ee8e8a58df9526c619ac80cd76bca8cf4ca107 (diff)
downloadchat-2e911b77c3386833f8f0cea82c7b6b3e5583a08e.tar.gz
chat-2e911b77c3386833f8f0cea82c7b6b3e5583a08e.tar.bz2
chat-2e911b77c3386833f8f0cea82c7b6b3e5583a08e.zip
Usernames must start with a letter (#5581)
Diffstat (limited to 'app/user_test.go')
-rw-r--r--app/user_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/user_test.go b/app/user_test.go
index 8979af7d7..ec0e2b73c 100644
--- a/app/user_test.go
+++ b/app/user_test.go
@@ -5,9 +5,9 @@ package app
import (
"bytes"
+ "encoding/json"
"image"
"image/color"
- "encoding/json"
"math/rand"
"strings"
"testing"
@@ -67,7 +67,7 @@ func TestCheckUserDomain(t *testing.T) {
func TestCreateOAuthUser(t *testing.T) {
th := Setup().InitBasic()
r := rand.New(rand.NewSource(time.Now().UnixNano()))
- glUser := oauthgitlab.GitLabUser{Id: int64(r.Intn(1000)), Username: model.NewId(), Email: model.NewId() + "@simulator.amazonses.com", Name: "Joram Wilander"}
+ glUser := oauthgitlab.GitLabUser{Id: int64(r.Intn(1000)), Username: "joram" + model.NewId(), Email: model.NewId() + "@simulator.amazonses.com", Name: "Joram Wilander"}
json := glUser.ToJson()
user, err := CreateOAuthUser(model.USER_AUTH_SERVICE_GITLAB, strings.NewReader(json), th.BasicTeam.Id)