Files
2026-07-16 16:32:44 -04:00

25 lines
519 B
Go

package config
import "testing"
func TestWebUIEnabledDefaultsTrue(t *testing.T) {
tru, fls := true, false
cases := []struct {
name string
in *bool
want bool
}{
{"unset defaults to enabled", nil, true},
{"explicit true", &tru, true},
{"explicit false", &fls, false},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
c := &ServiceConfig{EnableWebUI: tc.in}
if got := c.WebUIEnabled(); got != tc.want {
t.Errorf("WebUIEnabled() = %v, want %v", got, tc.want)
}
})
}
}