MCPcopy
hub / github.com/minio/minio-go / TestErrInvalidArgument

Function TestErrInvalidArgument

api-error-response_test.go:247–258  ·  view source on GitHub ↗

Test validates 'errInvalidArgument' response.

(t *testing.T)

Source from the content-addressed store, hash-verified

245
246// Test validates 'errInvalidArgument' response.
247func 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.
261func TestErrWithoutMessage(t *testing.T) {

Callers

nothing calls this directly

Calls 1

errInvalidArgumentFunction · 0.85

Tested by

no test coverage detected