diff options
author | Corey Hulen <corey@hulen.com> | 2016-05-11 11:04:30 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-11 14:04:30 -0400 |
commit | 3928535456f9fcb025ed86edeb4d258f2c524150 (patch) | |
tree | 010f4bd298f23b92711affcdef81cc329c522e67 /api/user_test.go | |
parent | a574397a7256bed7738f499019f97ab468b5161d (diff) | |
download | chat-3928535456f9fcb025ed86edeb4d258f2c524150.tar.gz chat-3928535456f9fcb025ed86edeb4d258f2c524150.tar.bz2 chat-3928535456f9fcb025ed86edeb4d258f2c524150.zip |
PLT-2905 fixing upgrade of SSO accounts (#2962)
* PLT-2905 fixing upgrade of SSO accounts
* Fixing multiple Auths mapped to different emails
Diffstat (limited to 'api/user_test.go')
-rw-r--r-- | api/user_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/api/user_test.go b/api/user_test.go index 9dd57dc20..c34d32c11 100644 --- a/api/user_test.go +++ b/api/user_test.go @@ -1109,7 +1109,8 @@ func TestSendPasswordReset(t *testing.T) { t.Fatal("Should have errored - bad email") } - user2 := &model.User{Email: strings.ToLower(model.NewId()) + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", AuthData: "1", AuthService: "random"} + authData := model.NewId() + user2 := &model.User{Email: strings.ToLower(model.NewId()) + "success+test@simulator.amazonses.com", Nickname: "Corey Hulen", AuthData: &authData, AuthService: "random"} user2 = Client.Must(Client.CreateUser(user2, "")).Data.(*model.User) LinkUserToTeam(user2, team) store.Must(Srv.Store.User().VerifyEmail(user2.Id)) @@ -1178,7 +1179,8 @@ func TestResetPassword(t *testing.T) { recovery = result.Data.(*model.PasswordRecovery) } - if result := <-Srv.Store.User().UpdateAuthData(user.Id, "random", "1", ""); result.Err != nil { + authData := model.NewId() + if result := <-Srv.Store.User().UpdateAuthData(user.Id, "random", &authData, ""); result.Err != nil { t.Fatal(result.Err) } |