summaryrefslogtreecommitdiffstats
path: root/app/license_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/license_test.go')
-rw-r--r--app/license_test.go18
1 files changed, 11 insertions, 7 deletions
diff --git a/app/license_test.go b/app/license_test.go
index 07805992a..178954bc9 100644
--- a/app/license_test.go
+++ b/app/license_test.go
@@ -5,33 +5,37 @@ package app
import (
//"github.com/mattermost/platform/model"
- "github.com/mattermost/platform/utils"
"testing"
+
+ "github.com/mattermost/platform/utils"
)
func TestLoadLicense(t *testing.T) {
- Setup()
+ a := Global()
+ a.Setup()
- LoadLicense()
+ a.LoadLicense()
if utils.IsLicensed() {
t.Fatal("shouldn't have a valid license")
}
}
func TestSaveLicense(t *testing.T) {
- Setup()
+ a := Global()
+ a.Setup()
b1 := []byte("junk")
- if _, err := SaveLicense(b1); err == nil {
+ if _, err := a.SaveLicense(b1); err == nil {
t.Fatal("shouldn't have saved license")
}
}
func TestRemoveLicense(t *testing.T) {
- Setup()
+ a := Global()
+ a.Setup()
- if err := RemoveLicense(); err != nil {
+ if err := a.RemoveLicense(); err != nil {
t.Fatal("should have removed license")
}
}