Add test coverage and fix a few minor problems

This commit is contained in:
Clayton Coleman
2014-10-28 22:48:59 -04:00
parent eac933eb44
commit 71fecef6f6
6 changed files with 290 additions and 5 deletions

View File

@@ -242,3 +242,10 @@ func TestDoRequestCreated(t *testing.T) {
}
fakeHandler.ValidateRequest(t, "/"+testapi.Version()+"/test", "GET", nil)
}
func TestDefaultPoll(t *testing.T) {
c := &RESTClient{PollPeriod: 0}
if req, ok := c.DefaultPoll("test"); req != nil || ok {
t.Errorf("expected nil request and not poll")
}
}