summaryrefslogtreecommitdiffstats
path: root/app/license_test.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-09-12 09:19:52 -0500
committerGitHub <noreply@github.com>2017-09-12 09:19:52 -0500
commitb066b6df138e88e75cb40f1ec3e58fbd13e61909 (patch)
tree7ee0e8c935cd3bbafd15d0d07d8900af8b82a4e0 /app/license_test.go
parent674a606bd00b276d0a05b3b29a3d5f5e5e7f8206 (diff)
downloadchat-b066b6df138e88e75cb40f1ec3e58fbd13e61909.tar.gz
chat-b066b6df138e88e75cb40f1ec3e58fbd13e61909.tar.bz2
chat-b066b6df138e88e75cb40f1ec3e58fbd13e61909.zip
Remove global app references (#7433)
* remove global app references * test fix * fix api4 test compilation
Diffstat (limited to 'app/license_test.go')
-rw-r--r--app/license_test.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/app/license_test.go b/app/license_test.go
index fabd949cf..376972b2b 100644
--- a/app/license_test.go
+++ b/app/license_test.go
@@ -11,31 +11,28 @@ import (
)
func TestLoadLicense(t *testing.T) {
- a := Global()
- a.Setup()
+ th := Setup()
- a.LoadLicense()
+ th.App.LoadLicense()
if utils.IsLicensed() {
t.Fatal("shouldn't have a valid license")
}
}
func TestSaveLicense(t *testing.T) {
- a := Global()
- a.Setup()
+ th := Setup()
b1 := []byte("junk")
- if _, err := a.SaveLicense(b1); err == nil {
+ if _, err := th.App.SaveLicense(b1); err == nil {
t.Fatal("shouldn't have saved license")
}
}
func TestRemoveLicense(t *testing.T) {
- a := Global()
- a.Setup()
+ th := Setup()
- if err := a.RemoveLicense(); err != nil {
+ if err := th.App.RemoveLicense(); err != nil {
t.Fatal("should have removed license")
}
}