Skip to content

Latest commit

 

History

History
424 lines (230 loc) · 10.1 KB

feedback.md

File metadata and controls

424 lines (230 loc) · 10.1 KB

Test Output

Read through all errors. Note that any failing test could be caused by a problem uncovered in a previous test on the same endpoint.

GET /api/articles/1

Assertion: expected [ Array(1) ] to be an object

Hints:

  • send the article to the client in an object, with a key of article: { article: {} }
  • return the single article in an object, not in an array
  • ensure there are no discrepancies between the README specification and your table column names

GET /api/articles/2

Assertion: Cannot read property 'votes' of undefined

Hints:

  • default the vote column to 0 in the migration
  • article with article_id 2 has no comments, you may need to check your join

GET /api/articles/1

Assertion: expected undefined to equal '13'

Hints:

  • ensure you have calculated a comment_count for the article

PUT /api/articles/1

Assertion: expected 404 to equal 405

Hints:

  • use .all() on each route, to serve a 405: Method Not Found status code

PATCH /api/articles/1

Assertion: expected 101 to equal 100

Hints:

  • ignore a patch request with no information in the request body, and send the unchanged article to the client
  • provide a default argument of 0 to the increment method, otherwise it will automatically increment by 1

GET /api/users/butter_bridge

Assertion: expected [ Array(1) ] to be an object

Hints:

  • send the user to the client in an object, with a key of user: { user: {} }
  • return the single user in an object, not in an array
  • ensure there are no discrepancies between the README specification and your table column names

PUT /api/users/butter_bridge

Assertion: expected 404 to equal 405

Hints:

  • use .all() on each route, to serve a 405: Method Not Found status code

DELETE /api

Assertion: expected 404 to equal 405

Hints:

  • use .all() on each route, to serve a 405: Method Not Found status code