summaryrefslogtreecommitdiffstats
path: root/jobs/server_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-02-12 18:36:39 -0600
committerGitHub <noreply@github.com>2018-02-12 18:36:39 -0600
commitfbef16f8630f74248157c2cd9e546ece355c869a (patch)
tree95feb1a0b94f43fd38533adc508df2daf823ea86 /jobs/server_test.go
parent56f49cf4860cfca51e852ec3e7d9df772d2b2060 (diff)
parent32c1f7be239ddb19d6c59b114d9ae1a543f8ba9c (diff)
downloadchat-fbef16f8630f74248157c2cd9e546ece355c869a.tar.gz
chat-fbef16f8630f74248157c2cd9e546ece355c869a.tar.bz2
chat-fbef16f8630f74248157c2cd9e546ece355c869a.zip
Merge branch 'release-4.7' into rm-willnorris-proxy-support
Diffstat (limited to 'jobs/server_test.go')
-rw-r--r--jobs/server_test.go39
1 files changed, 39 insertions, 0 deletions
diff --git a/jobs/server_test.go b/jobs/server_test.go
new file mode 100644
index 000000000..3b5ef6f3d
--- /dev/null
+++ b/jobs/server_test.go
@@ -0,0 +1,39 @@
+// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+package jobs
+
+import (
+ "testing"
+
+ "github.com/mattermost/mattermost-server/model"
+ "github.com/mattermost/mattermost-server/store"
+ "github.com/mattermost/mattermost-server/store/storetest"
+ "github.com/mattermost/mattermost-server/utils"
+)
+
+func TestJobServer_LoadLicense(t *testing.T) {
+ if utils.T == nil {
+ utils.TranslationsPreInit()
+ }
+
+ mockStore := &storetest.Store{}
+ defer mockStore.AssertExpectations(t)
+
+ server := &JobServer{
+ Store: mockStore,
+ }
+
+ mockStore.SystemStore.On("Get").Return(storetest.NewStoreChannel(store.StoreResult{
+ Data: model.StringMap{
+ model.SYSTEM_ACTIVE_LICENSE_ID: "thelicenseid00000000000000",
+ },
+ }))
+ mockStore.LicenseStore.On("Get", "thelicenseid00000000000000").Return(storetest.NewStoreChannel(store.StoreResult{
+ Data: &model.LicenseRecord{
+ Id: "thelicenseid00000000000000",
+ },
+ }))
+
+ server.LoadLicense()
+}