Skip to content

Conversation

@simply-alliv
Copy link
Collaborator

Before submitting your PR for review

  • Run npm run lint to find errors in code syntax/format
  • Run npm run lint:fix to fix all auto-fixable errors in source code and auto-format with prettier
  • Ensure you fix any linting errors displayed after running any of the above commands

What does this PR do?

Fixes #369

This PR implements a test suite that will cover all required functionality expected from the updateSingleReplyDownVotes endpoint /v1/comments/{commentId}/replies/{replyId}/votes/downvote. For each test that doesn't pass, the controller method (along with its validation schema and swagger docs if the modifications require it) will be modified to include the required functionalities so that the test passes.

description of Task to be completed?

  • test that a request returns with the correct update response and status 200
  • test that a request with an unauthorized token returns with correct error response and status 401
  • test that a request with an invalid ID returns with correct error response and status 404
  • test that a request with a missing "ownerId" returns with correct error response and status 422

How should this be manually tested?

  • In your terminal, run npm test

Any background context you want to provide?

None

What is the link to the issue on Github?

Issue #369

Questions:

None

@dave-ok dave-ok merged commit b717c01 into microapidev:develop Jul 8, 2020
@simply-alliv simply-alliv deleted the update-single-reply-down-vote-test branch July 8, 2020 12:13
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.

[TEST] updateSingleReplyDownVotes API Endpoint

2 participants