evcc-io/messenger/template_test.go
Maschga 7f772bad73
Config UI: make messengers configurable (#26946)
Co-authored-by: andig <cpuidle@gmail.com>
Co-authored-by: andig <andi@evcc.io>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: Michael Geers <michael@geers.tv>
2026-02-17 12:26:03 +01:00

24 lines
518 B
Go

package messenger
import (
"testing"
"github.com/evcc-io/evcc/util/templates"
"github.com/evcc-io/evcc/util/test"
)
var acceptable = []string{
// api.ErrMissingCredentials.Error(),
// api.ErrMissingToken.Error(),
}
func TestTemplates(t *testing.T) {
templates.TestClass(t, templates.Messenger, 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)
}
})
}