app/attribute/attribute_test.go

23 lines
487 B
Go

package attribute
import (
"fmt"
"testing"
"github.com/spf13/viper"
"kumoly.io/kumoly/app/store"
)
func TestAttr(t *testing.T) {
viper.Set("data", "work")
viper.Set("db.type", "sqlite")
store.Setup()
Init()
fmt.Println(Add("test", "test", "", "1", false))
fmt.Println(Add("test1", "test1", "", "2", false))
fmt.Println(Add("test1", "test2", "", "2", false))
fmt.Println(Add("test1", "test3", "", "2", false))
fmt.Println(Set("test", "reset"))
fmt.Println(Get("test"))
}