chore: test tariff templates
This commit is contained in:
parent
3bbec2aa5e
commit
457284c28d
1 changed files with 21 additions and 0 deletions
21
tariff/template_test.go
Normal file
21
tariff/template_test.go
Normal 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)
|
||||
}
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue