summaryrefslogtreecommitdiffstats
path: root/api/user_test.go
diff options
context:
space:
mode:
authorDerrick Anderson <derrick@andersonwebstudio.com>2018-02-12 15:09:59 -0500
committerDerrick Anderson <derrick@andersonwebstudio.com>2018-02-12 15:09:59 -0500
commitefd620d6c80ddc1f015811ec58514e34ee0b501b (patch)
tree8fdcc1043aba1c9a66382b915f4e185ade1128fb /api/user_test.go
parent87fb19b8279c86c72ffec623e55b80ce35b7d64f (diff)
parent1ae680aefae2deb1e9d07d7c2a1c863ec807a79f (diff)
downloadchat-efd620d6c80ddc1f015811ec58514e34ee0b501b.tar.gz
chat-efd620d6c80ddc1f015811ec58514e34ee0b501b.tar.bz2
chat-efd620d6c80ddc1f015811ec58514e34ee0b501b.zip
Merge branch 'release-4.7' into icu669
Diffstat (limited to 'api/user_test.go')
-rw-r--r--api/user_test.go15
1 files changed, 2 insertions, 13 deletions
diff --git a/api/user_test.go b/api/user_test.go
index 8d6aad22b..f65d7c45b 100644
--- a/api/user_test.go
+++ b/api/user_test.go
@@ -1889,17 +1889,7 @@ func TestUpdateMfa(t *testing.T) {
Client := th.BasicClient
- isLicensed := utils.IsLicensed()
- license := utils.License()
- defer func() {
- utils.SetIsLicensed(isLicensed)
- utils.SetLicense(license)
- }()
- utils.SetIsLicensed(false)
- utils.SetLicense(&model.License{Features: &model.Features{}})
- if utils.License().Features.MFA == nil {
- utils.License().Features.MFA = new(bool)
- }
+ th.App.SetLicense(nil)
team := model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
rteam, _ := Client.CreateTeam(&team)
@@ -1925,8 +1915,7 @@ func TestUpdateMfa(t *testing.T) {
t.Fatal("should have failed - not licensed")
}
- utils.SetIsLicensed(true)
- *utils.License().Features.MFA = true
+ th.App.SetLicense(model.NewTestLicense("mfa"))
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnableMultifactorAuthentication = true })
if _, err := Client.UpdateMfa(true, "123456"); err == nil {