Documentation
¶
Index ¶
- func CheckDate(expectedStr string, format string) func(json interface{}) error
- func CheckDateClose(target time.Time, leeway time.Duration) func(json interface{}) error
- func CheckExpectedM(result gjson.Result, expected *ExpectedM) error
- func CheckGJSONLength(k string, expectedValue, actualValue interface{}) error
- func CheckJSON(obj interface{}, expected *ExpectedM) error
- func CheckJSONBytes(js []byte, expected *ExpectedM) error
- func CheckJSONString(js string, expected *ExpectedM) error
- func MustInt(val interface{}) (int, error)
- type ExpectedM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDateClose ¶
Example:
test := { bodyShouldHave: ExpectedM{ "created": CheckDateClose(time.Now(), time.Second), }
func CheckGJSONLength ¶
func CheckJSONBytes ¶
func CheckJSONString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.