| 123456789101112131415161718192021222324252627 |
- package btn_monolit
- import (
- "testing"
- "gitp78su.ipnodns.ru/svi/kern/v2/krn/kctx"
- "gitp78su.ipnodns.ru/svi/kern/v2/krn/kmodule"
- "gitp78su.ipnodns.ru/svi/kern/v2/krn/kmonolit"
- )
- func TestBtnModules(t *testing.T) {
- btn := NewBtnMonolit()
- if btn == nil {
- t.Fatalf("btn==nil")
- }
- if html := btn.Html(); html == "" {
- t.Fatalf("html is empty")
- }
- kCtx := kctx.GetKernelCtx()
- kCtx.Set("isLocal", true, "test")
- kMon := kmonolit.GetMonolit("test")
- mod := kmodule.NewKernelModule("test")
- kMon.Add(mod)
- if str := btn.clickMonolit(map[string]string{}); str == "" {
- t.Fatalf("strOut is empty")
- }
- }
|