Skip to content

Conversation

@canaanwest
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 seed data to determine what the relationship was between the two sets of data. There was no relationship initially, so we created an ERD that had no relationship between the two models. Later, we created a relationship between the two models in the form of the Rentals model; this changed our ERD to include a one-to-many relationship between Movies and Rentals and a one-to-many relationship between Customers and models
Describe a set of positive and negative test cases you implemented for a model. We tested to make sure the Movies model would succeed in creating a new movie with a title and release date, and we tested to make sure it would fail in doing so without each of those items.
Describe a set of positive and negative test cases you implemented for a controller. For the rentals controller, we tested to make sure a rental could be created if there was inventory available, and conversely, that it would fail in creating a rental if inventory for that movie was not available.
How does your API respond when bad data is sent to it? It renders a :bad_request
Describe one of your custom model methods and why you chose to wrap that functionality into a method. We made a custom method to set the checkout and due dates for a movie. We did this because this functionality was designed to manipulate data that was being held inside of the model for Rentals, and it's best to keep business logic out of controllers. It also helped us to clean up the controller code, which became kind of unruly when those methods were in it.
Do you have any recommendations on how we could improve this project for the next cohort? It felt to us like some of the optionals were less optional than others, and we felt that it would be best to just make them required if that's what they were.
Link to Trello https://trello.com/b/G7ZwYT6j/video-store
Link to ERD https://www.lucidchart.com/documents/edit/bd9f62c9-7407-4b02-85c9-e7dbf4f0ff65#

canaanwest and others added 29 commits November 12, 2017 12:33
@CheezItMan
Copy link

Video Store

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good number of commits and good commit messages, both partners turned in commits.
Comprehension questions Check, no the optional were optional given the short week, but we'll take that under advisement.
General
Business Logic in Models Very nicely done I like the sorting methods.
All 3 required endpoints return expected JSON data Check, well done. Nice work using the Serializers
Requests respond with appropriate HTTP Status Code Check
Errors are reported Check
Testing
Passes all Smoke Tests Check
Model Tests - all relations, validations, and custom functions test positive & negative cases Check
Controller Tests - URI parameters and data in the request body have positive & negative cases Nice positive and negative tests
Optionals
POST routes use URI parameter and request body to add a new record to the database Check
GET /customers shows how many movies are checked out by a customer Check
GET /movies/:id shows updated inventory Check
Overall This is great work, nicely done with most of the optionals working!

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