diff --git a/tariff/template_test.go b/tariff/template_test.go new file mode 100644 index 000000000..4886f5a29 --- /dev/null +++ b/tariff/template_test.go @@ -0,0 +1,21 @@ +package tariff + +import ( + "testing" + + "github.com/evcc-io/evcc/util/templates" + "github.com/evcc-io/evcc/util/test" +) + +var acceptable = []string{} + +func TestTemplates(t *testing.T) { + templates.TestClass(t, templates.Tariff, func(t *testing.T, values map[string]any) { + t.Helper() + + if _, err := NewFromConfig("template", values); err != nil && !test.Acceptable(err, acceptable) { + t.Log(values) + t.Error(err) + } + }) +}