change expected input for request type :
input createUserRequest
and expected output :
expectedOutput createUserResponse
instead of
input getUserRequest
expectedOutput entities.User
and delete conditionals inside the test
from
ep := makeGetUserEndpoint(serviceMock, logger)
if !ok {
t.Errorf("Error parsing user response on test")
return
}
to
result, err := ep(ctx, tc.input)
assert.Equal(t, tc.expectedError, err, "Error on service create user ")
change expected input for request type :
input createUserRequest
and expected output :
expectedOutput createUserResponse
instead of
and delete conditionals inside the test
from
ep := makeGetUserEndpoint(serviceMock, logger)
if !ok {
t.Errorf("Error parsing user response on test")
return
}
to
result, err := ep(ctx, tc.input)
assert.Equal(t, tc.expectedError, err, "Error on service create user ")