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

Kimberley & Bianca |Pipes| VideoStore! #14

Open
wants to merge 62 commits into
base: master
Choose a base branch
from

Conversation

biciclista22
Copy link

Video Store API

Congratulations! You're submitting your assignment!
If you didn't get to the functionality the question is asking about, reply with what you would have done if you had completed it.

Comprehension Questions

Question Answer
Explain how you came up with the design of your ERD, based on the seed data. We looked at the assignment description and some small user stories to decide on the ERD. The seed data was useful to see what possible links there could be as well as necessary attributes for each model.
Describe a set of positive and negative test cases you implemented for a model. We tested the validations as well as the relationships we established between rentals, movies and customers. Specifically for movies, we created additional model methods connected to inventory addition, subtraction and checks. We created a negative edge case where we tested what would happen if there wasn't enough inventory. We accounted for the error message we would want it to return.
Describe a set of positive and negative test cases you implemented for a controller. For the rental controller, we did a variety of tests for the checkout method. We created a test where the input was not valid and tested for the bad_request response. We also checked to see that a rental was not added to the database if the input was not valid.
How does your API respond when bad data is sent to it? We decided to respond with Bad Request.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. We created #check_inventory, #increase_inventory, and #decrease_inventory methods in the movies model. We chose to wrap that functionality into a method because we wanted to isolate that code and put it in movies even though we call it in rentals. We didn't want rentals to know too much about movies and its behavior and attributes.
Do you have any recommendations on how we could improve this project for the next cohort?
Link to Trello https://trello.com/b/i4ET5nCI/video-store-api
Link to ERD Link to photo in our Trello Board

kimpossible1 and others added 30 commits November 6, 2017 13:51
biciclista22 and others added 28 commits November 7, 2017 11:15
…ded a test for it. It seems like it works now
…s and changes in the controller to allow smoke tests to pass
@PilgrimMemoirs
Copy link

Video Store

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Well Done
Comprehension questions Well Done
General
Business Logic in Models Well Done
All 3 required endpoints return expected JSON data Well Done
Requests respond with appropriate HTTP Status Code Well Done
Errors are reported Well Done
Testing
Passes all Smoke Tests Well Done
Model Tests - all relations, validations, and custom functions test positive & negative cases Well Done
Controller Tests - URI parameters and data in the request body have positive & negative cases Mostly Good - Customers and Movies "won't change db if data is missing" test should split the assertions into a few tests, if this one fails because the status code is different, the test won't read that way.
Optionals
POST routes use URI parameter and request body to add a new record to the database Well Done - uses post body
GET /customers shows how many movies are checked out by a customer Well Done
GET /movies/:id shows updated inventory Well Done
Overall
Great work! Submission meets project expectations.

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.

3 participants