New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLIBZ-2246: find by id must return entity not found error #257

Merged
merged 1 commit into from Dec 13, 2017

Conversation

Projects
None yet
2 participants
@heyzooi
Contributor

heyzooi commented Dec 12, 2017

Description

Find by _id must return EntityNotFound error

Changes

  • Added one more case for the Error enum

Tests

  • Unit test added to cover the situation when the entity was not found

@heyzooi heyzooi self-assigned this Dec 12, 2017

@heyzooi heyzooi requested a review from tejasranade Dec 12, 2017

func testFindByIdEntityNotFoundError() {
mockResponse(
statusCode: 404,
json: [

This comment has been minimized.

@tejasranade

tejasranade Dec 12, 2017

Member

This should be a JSON object, not an array. How is this mock response working at all? 😕

@tejasranade

tejasranade Dec 12, 2017

Member

This should be a JSON object, not an array. How is this mock response working at all? 😕

This comment has been minimized.

@heyzooi

heyzooi Dec 13, 2017

Contributor

this is not an array, this is how you must declare dictionaries (to be converted to json object later on) in Swift. So ["key" : "value"] is a dictionary and ["value"] is an array

@heyzooi

heyzooi Dec 13, 2017

Contributor

this is not an array, this is how you must declare dictionaries (to be converted to json object later on) in Swift. So ["key" : "value"] is a dictionary and ["value"] is an array

This comment has been minimized.

@tejasranade

tejasranade Dec 13, 2017

Member

Duh! 🙄

@tejasranade

tejasranade Dec 13, 2017

Member

Duh! 🙄

@heyzooi heyzooi merged commit 6d9746c into develop Dec 13, 2017

0 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
codebeat 0 issues resolved and 3 introduced
Details

@heyzooi heyzooi deleted the feature/MLIBZ-2246-entity_not_found_error branch Dec 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment