TinySkin/config/yaml_test.go
2023-10-11 14:30:26 +08:00

21 lines
258 B
Go

package config
import (
"os"
"testing"
)
func TestYamlDeCode(t *testing.T) {
b, err := os.ReadFile("config.yaml")
if err != nil {
t.Fatal(err)
}
c, err := YamlDeCode(b)
if err != nil {
t.Fatal(err)
}
if c.Sql.Dsn != "123" {
t.FailNow()
}
}