func (*urlParamsSuite) TestNewMaybeAddManyValues(c *gc.C) { params := gomaasapi.NewURLParams() params.MaybeAddMany("foo", []string{"two", "", "values"}) c.Assert(params.Values.Encode(), gc.Equals, "foo=two&foo=values") }
func (*urlParamsSuite) TestNewMaybeAddManyNil(c *gc.C) { params := gomaasapi.NewURLParams() params.MaybeAddMany("foo", nil) c.Assert(params.Values.Encode(), gc.Equals, "") }
func (*urlParamsSuite) TestNewMaybeAddIntWithValue(c *gc.C) { params := gomaasapi.NewURLParams() params.MaybeAddInt("foo", 42) c.Assert(params.Values.Encode(), gc.Equals, "foo=42") }
func (*urlParamsSuite) TestNewMaybeAddBoolTrue(c *gc.C) { params := gomaasapi.NewURLParams() params.MaybeAddBool("foo", true) c.Assert(params.Values.Encode(), gc.Equals, "foo=true") }
func (*urlParamsSuite) TestNewParamsNonNilValues(c *gc.C) { params := gomaasapi.NewURLParams() c.Assert(params.Values, gc.NotNil) }