chore: test tariff templates

This commit is contained in:
andig 2024-05-04 15:34:44 +02:00
parent 3bbec2aa5e
commit 457284c28d

21
tariff/template_test.go Normal file
View file

@ -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)
}
})
}