diff options
Diffstat (limited to 'api4/apitestlib.go')
-rw-r--r-- | api4/apitestlib.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/api4/apitestlib.go b/api4/apitestlib.go index 27bf83f10..84f87d494 100644 --- a/api4/apitestlib.go +++ b/api4/apitestlib.go @@ -260,6 +260,20 @@ func (me *TestHelper) LoginSystemAdminWithClient(client *model.Client4) { utils.EnableDebugLogForTest() } +func (me *TestHelper) UpdateActiveUser(user *model.User, active bool) { + utils.DisableDebugLogForTest() + + _, err := app.UpdateActive(user, active) + if err != nil { + l4g.Error(err.Error()) + l4g.Close() + time.Sleep(time.Second) + panic(err) + } + + utils.EnableDebugLogForTest() +} + func LinkUserToTeam(user *model.User, team *model.Team) { utils.DisableDebugLogForTest() |