Commit 579fa749 authored by Wojciech Tyczynski's avatar Wojciech Tyczynski

Add test for TimeoutSeconds parameter

parent 1524d749
......@@ -157,6 +157,16 @@ func TestRequestParam(t *testing.T) {
}
}
func TestTimeoutSeconds(t *testing.T) {
r := &Request{}
r.TimeoutSeconds(time.Duration(5 * time.Second))
if !reflect.DeepEqual(r.params, url.Values{
"timeoutSeconds": []string{"5"},
}) {
t.Errorf("invalid timeoutSeconds parameter: %#v", r)
}
}
func TestRequestVersionedParams(t *testing.T) {
r := (&Request{apiVersion: "v1"}).Param("foo", "a")
if !reflect.DeepEqual(r.params, url.Values{"foo": []string{"a"}}) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment