From b066b6df138e88e75cb40f1ec3e58fbd13e61909 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 12 Sep 2017 09:19:52 -0500 Subject: Remove global app references (#7433) * remove global app references * test fix * fix api4 test compilation --- app/license_test.go | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'app/license_test.go') 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") } } -- cgit v1.2.3-1-g7c22