changes per comment

This commit is contained in:
Austin
2015-05-28 16:53:54 -07:00
parent 6b173b5170
commit 593aec9ab1
4 changed files with 15 additions and 32 deletions

View File

@ -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.")
}