diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-26 14:21:22 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-10-26 15:21:22 -0400 |
commit | 7ed011745a544873f40f806f1803cb8a4998ba01 (patch) | |
tree | fe13919b050b33c8dd3f6ca5fce6ad1980b2dd3e /api4/user_test.go | |
parent | a0bfd2885d03e3f9fb6b3cdd6ba60eea93c848b2 (diff) | |
download | chat-7ed011745a544873f40f806f1803cb8a4998ba01.tar.gz chat-7ed011745a544873f40f806f1803cb8a4998ba01.tar.bz2 chat-7ed011745a544873f40f806f1803cb8a4998ba01.zip |
Remove more global refs / state (#7723)
* remove more global refs / state
* fix job enterprise initialization
* fix api4 test compilation
* saml api endpoints fix
Diffstat (limited to 'api4/user_test.go')
-rw-r--r-- | api4/user_test.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/api4/user_test.go b/api4/user_test.go index eee9aa8a2..5424a1ee2 100644 --- a/api4/user_test.go +++ b/api4/user_test.go @@ -10,7 +10,6 @@ import ( "testing" "time" - "github.com/mattermost/mattermost-server/app" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/utils" "github.com/stretchr/testify/assert" @@ -961,7 +960,7 @@ func TestUpdateUser(t *testing.T) { session, _ := th.App.GetSession(Client.AuthToken) session.IsOAuth = true - app.AddSessionToCache(session) + th.App.AddSessionToCache(session) ruser.Id = user.Id ruser.Email = GenerateTestEmail() @@ -1045,7 +1044,7 @@ func TestPatchUser(t *testing.T) { session, _ := th.App.GetSession(Client.AuthToken) session.IsOAuth = true - app.AddSessionToCache(session) + th.App.AddSessionToCache(session) patch.Email = model.NewString(GenerateTestEmail()) _, resp = Client.PatchUser(user.Id, patch) @@ -1513,7 +1512,7 @@ func TestUpdateUserMfa(t *testing.T) { session, _ := th.App.GetSession(Client.AuthToken) session.IsOAuth = true - app.AddSessionToCache(session) + th.App.AddSessionToCache(session) _, resp := Client.UpdateUserMfa(th.BasicUser.Id, "12345", false) CheckForbiddenStatus(t, resp) @@ -1609,7 +1608,7 @@ func TestGenerateMfaSecret(t *testing.T) { session, _ := th.App.GetSession(Client.AuthToken) session.IsOAuth = true - app.AddSessionToCache(session) + th.App.AddSessionToCache(session) _, resp = Client.GenerateMfaSecret(th.BasicUser.Id) CheckForbiddenStatus(t, resp) @@ -2257,7 +2256,7 @@ func TestCreateUserAccessToken(t *testing.T) { session, _ := th.App.GetSession(Client.AuthToken) session.IsOAuth = true - app.AddSessionToCache(session) + th.App.AddSessionToCache(session) _, resp = Client.CreateUserAccessToken(th.BasicUser.Id, testDescription) CheckForbiddenStatus(t, resp) |