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

#160977693 Admin should not be able to update the status of a non-existent order #54

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

akhilome
Copy link
Owner

@akhilome akhilome commented Oct 4, 2018

What does this PR do?

handle edge case where Admin is trying to update the status of an order which hasn't been created yet.

Description of Task to be completed?

  • write new test case to handle this change
  • modify PUT /orders/:id to make tests pass

How should this be manually tested?

Clone the project repo, cd into the project directory

git clone https://github.com/akhilome/fast-food-fast.git && cd fast-food-fast

install dependencies and setup db

rename .env.example to .env and configure appropriately, then run

npm i && npm run setup-testdb && npm run seed-db
  • open up postman and sign up for an admin account using the email hovkard@gmail.com
  • login to the account to get a valid auth token
  • send a PUT request to http://localhost:3000/api/v1/orders/1000 providing a status of complete in the body section.

What are the relevant pivotal tracker stories?

#160977693

- write new test case to handle this change
- modify PUT /orders/:id to make tests pass

[Fixes #160977693]
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 97.782% when pulling f09129e on bg-order-status-160977693 into 3f2223e on develop.

@akhilome akhilome merged commit 7a02e53 into develop Oct 4, 2018
@akhilome akhilome deleted the bg-order-status-160977693 branch October 8, 2018 21:35
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