summaryrefslogtreecommitdiffstats
path: root/app/session_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-02-07 16:20:51 -0600
committerGitHub <noreply@github.com>2018-02-07 16:20:51 -0600
commit0f703a3368a0b16fcd48b474377f0dbd2144f366 (patch)
tree4928199b534de6e1d42d8057c70ebe626b237d4a /app/session_test.go
parenteff65aa05c74e93533c2504b8141b0474011e68c (diff)
downloadchat-0f703a3368a0b16fcd48b474377f0dbd2144f366.tar.gz
chat-0f703a3368a0b16fcd48b474377f0dbd2144f366.tar.bz2
chat-0f703a3368a0b16fcd48b474377f0dbd2144f366.zip
Eliminate utils.SetLicense calls (#8217)
* eliminate utils.SetLicense calls * test fix * another test fix * more test fixes
Diffstat (limited to 'app/session_test.go')
-rw-r--r--app/session_test.go13
1 files changed, 1 insertions, 12 deletions
diff --git a/app/session_test.go b/app/session_test.go
index bca3b59b7..09d81f4ac 100644
--- a/app/session_test.go
+++ b/app/session_test.go
@@ -48,18 +48,7 @@ func TestGetSessionIdleTimeoutInMinutes(t *testing.T) {
session, _ = th.App.CreateSession(session)
- isLicensed := utils.IsLicensed()
- license := utils.License()
- timeout := *th.App.Config().ServiceSettings.SessionIdleTimeoutInMinutes
- defer func() {
- utils.SetIsLicensed(isLicensed)
- utils.SetLicense(license)
- th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.SessionIdleTimeoutInMinutes = timeout })
- }()
- utils.SetIsLicensed(true)
- utils.SetLicense(&model.License{Features: &model.Features{}})
- utils.License().Features.SetDefaults()
- *utils.License().Features.Compliance = true
+ th.App.SetLicense(model.NewTestLicense("compliance"))
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.SessionIdleTimeoutInMinutes = 5 })
rsession, err := th.App.GetSession(session.Token)