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