fix bug/web template init

This commit is contained in:
Aynakeya
2022-07-18 22:58:52 -07:00
parent f69327d53d
commit a385b341f7
4 changed files with 105 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
package webinfo
import (
"fmt"
"testing"
)
func TestTemplateStore_Create(t *testing.T) {
s := newTemplateStore(WebTemplateStorePath)
s.Get("A")
s.Get("B")
s.Modify("A", "123123")
s.Save(WebTemplateStorePath)
}
func TestTemplateStore_Load(t *testing.T) {
s := newTemplateStore(WebTemplateStorePath)
for name, tmpl := range s.Templates {
fmt.Println(name, tmpl.Template)
}
}