Skip to content
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

heyzooi
Copy link
Contributor

@heyzooi 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
func testFindByIdEntityNotFoundError() {
mockResponse(
statusCode: 404,
json: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

@heyzooi heyzooi Dec 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duh! 🙄

@heyzooi heyzooi merged commit 6d9746c into develop Dec 13, 2017
@heyzooi heyzooi deleted the feature/MLIBZ-2246-entity_not_found_error branch December 13, 2017 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants