mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-22 01:29:59 +08:00
changes per comment
This commit is contained in:
@ -43,9 +43,10 @@ func TestSelect(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestRegisterPolicy(t *testing.T) {
|
||||
name := "custom"
|
||||
customPolicy := &customPolicy{}
|
||||
RegisterPolicy(customPolicy)
|
||||
if _, ok := supportedPolicies[customPolicy.Name()]; !ok {
|
||||
RegisterPolicy(name, func() Policy { return customPolicy })
|
||||
if _, ok := supportedPolicies[name]; !ok {
|
||||
t.Error("Expected supportedPolicies to have a custom policy.")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user