Test validates 'errInvalidArgument' response.
(t *testing.T)
| 245 | |
| 246 | // Test validates 'errInvalidArgument' response. |
| 247 | func TestErrInvalidArgument(t *testing.T) { |
| 248 | expectedResult := ErrorResponse{ |
| 249 | StatusCode: http.StatusBadRequest, |
| 250 | Code: InvalidArgument, |
| 251 | Message: "Invalid Argument", |
| 252 | RequestID: "minio", |
| 253 | } |
| 254 | actualResult := errInvalidArgument("Invalid Argument") |
| 255 | if !reflect.DeepEqual(expectedResult, actualResult) { |
| 256 | t.Errorf("Expected result to be '%#v', but instead got '%#v'", expectedResult, actualResult) |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | // Tests if the Message field is missing. |
| 261 | func TestErrWithoutMessage(t *testing.T) { |
nothing calls this directly
no test coverage detected