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

test: API Empty TX Object Response #85

Merged
merged 11 commits into from May 8, 2019
Merged

test: API Empty TX Object Response #85

merged 11 commits into from May 8, 2019

Conversation

sleepdefic1t
Copy link
Contributor

@sleepdefic1t sleepdefic1t commented May 7, 2019

Proposed changes

This small PR updates the API Response test when posting an empty transactions objects.
It also updates the changelog.

Response was:

"child "transactions" fails because ["transactions" must contain at least 1 items]"

Response is now:

"should NOT have fewer than 1 items"

It now tests for "statusCode" '422'

Types of changes

  • Test (adding missing tests or fixing existing tests)

Checklist

  • I have read the CONTRIBUTING documentation
  • Lint and unit tests pass locally with my changes

@ghost ghost added Complexity: Low Less than 64 lines changed. Test: Unit The issue or pull request is related to unit tests for testing individual elements. labels May 7, 2019
@ghost
Copy link

ghost commented May 7, 2019

The ci/circleci: build-linux-default job is failing as of d61f66830daae5f5ae8e5e251f49e171f8206826. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@ghost
Copy link

ghost commented May 7, 2019

The ci/circleci: build-linux-default job is failing as of 0e21097b3214ebb3ffc67afacb6531634659e03b. Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@sleepdefic1t
Copy link
Contributor Author

Test failures are not a result of this PR.

This is a PlatformIO/ArduinoJson package issue, and will be resolved like ArkEcosystemArchive/cpp-crypto#76.

Copy link
Contributor

@faustbrian faustbrian left a comment

Choose a reason for hiding this comment

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

You should always test for a specific HTTP status code instead of relying on messages because those can always change. In this case you should test for status code 422 in the response.

- also update changelog brief
@sleepdefic1t
Copy link
Contributor Author

Thank you, @faustbrian
PR has been updated accordingly 👍

@faustbrian faustbrian merged commit 6858d9b into ArkEcosystemArchive:master May 8, 2019
@sleepdefic1t sleepdefic1t deleted the test/api-response branch May 9, 2019 15:31
This was referenced Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Low Less than 64 lines changed. Test: Unit The issue or pull request is related to unit tests for testing individual elements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants