21 lines
445 B
Go
21 lines
445 B
Go
package curtailer
|
|
|
|
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.Curtailer, func(t *testing.T, values map[string]any) {
|
|
t.Helper()
|
|
|
|
if _, err := NewFromConfig(t.Context(), "template", values); err != nil && !test.Acceptable(err, acceptable) {
|
|
t.Log(values)
|
|
t.Error(err)
|
|
}
|
|
})
|
|
}
|