summaryrefslogtreecommitdiffstats
path: root/api4/user_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-12-08 14:14:55 -0500
committerChristopher Speller <crspeller@gmail.com>2017-12-08 11:14:55 -0800
commit617a98d6d8a48e347921bdcaa5155b4022174d87 (patch)
treeaefb864af543e816621e0f4a9bcacd523c9fce89 /api4/user_test.go
parentae931ae6b63047d3a5362ab217ebdcf4ecaa6cb8 (diff)
downloadchat-617a98d6d8a48e347921bdcaa5155b4022174d87.tar.gz
chat-617a98d6d8a48e347921bdcaa5155b4022174d87.tar.bz2
chat-617a98d6d8a48e347921bdcaa5155b4022174d87.zip
Allow deactivation of SSO users (#7952)
Diffstat (limited to 'api4/user_test.go')
-rw-r--r--api4/user_test.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/api4/user_test.go b/api4/user_test.go
index 9c554da54..e3f1935b4 100644
--- a/api4/user_test.go
+++ b/api4/user_test.go
@@ -1163,6 +1163,13 @@ func TestUpdateUserActive(t *testing.T) {
_, resp = SystemAdminClient.UpdateUserActive(user.Id, false)
CheckNoError(t, resp)
+
+ authData := model.NewId()
+ result := <-th.App.Srv.Store.User().UpdateAuthData(user.Id, "random", &authData, "", true)
+ require.Nil(t, result.Err)
+
+ _, resp = SystemAdminClient.UpdateUserActive(user.Id, false)
+ CheckNoError(t, resp)
}
func TestGetUsers(t *testing.T) {
@@ -2123,7 +2130,9 @@ func TestSwitchAccount(t *testing.T) {
defer func() {
utils.SetIsLicensed(isLicensed)
utils.SetLicense(license)
- th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.ExperimentalEnableAuthenticationTransfer = enableAuthenticationTransfer })
+ th.App.UpdateConfig(func(cfg *model.Config) {
+ *cfg.ServiceSettings.ExperimentalEnableAuthenticationTransfer = enableAuthenticationTransfer
+ })
}()
utils.SetIsLicensed(true)
utils.SetLicense(&model.License{Features: &model.Features{}})