* remove global app references

* test fix

* fix api4 test compilation
Этот коммит содержится в:
Chris
2017-09-12 09:19:52 -05:00
коммит произвёл GitHub
родитель 674a606bd0
Коммит b066b6df13
37 изменённых файлов: 724 добавлений и 1434 удалений

Просмотреть файл

@@ -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")
}
}