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

Stacks/Theresa/Rana -VideoStore #14

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

Conversation

RanaSulaiman
Copy link

@RanaSulaiman RanaSulaiman commented May 12, 2017

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 followed the API specification that were giving to us through the JSON data to build the ERD fields. Then we came up with the rental table to relate customers and movies to each others.
List all the completed endpoints of your application. /customers>, /movies>, <movies/:title>, </rentals/:title/check-out>, </rentals/:title/check-in>, </rentals/overdue>. Note, we don't have testing for the optional part rentals/overdue.
Describe a set of positive and negative test cases you implemented for a model. for customer model, we have positive test case to validate a customer should have a phone number and for the negative test case we make sure an appropriate error message appears if the customer doesn't have a valid fields.
Describe a set of positive and negative test cases you implemented for a controller. for rentals controller, we have a test case to validate that we can create a new rental record and for the negative test case the movie won't be marked as checked out if the due date was not exist.
How does your API respond when bad data is sent to it? displays error messages in a hash form that has a value of a specific message.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. Although we don't have any model custom method, we created private methods in our rentals controller and called them as before actions
Do you have any recommendations on how we could improve this project for the next cohort? We felt that the material prior to the project was taught well, the main issue we faced was all the distractions that were around this week. This included Amazon day, whiteboard practicing, and preparing our resumes and bios.
Link to Trello Rana printed out the ReadMe paperwork and we check off out requirements as we went, we also made sure to look back at old requirements to make sure all changes we made did not break primary requirements.
Link to ERD https://www.lucidchart.com/invitations/accept/6770335d-ebc8-4a86-9aa4-890f4c74a2f1

TheresaManney and others added 30 commits May 9, 2017 13:03
Added index method to movies_controller
@kariabancroft
Copy link

Video Store

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Looks good - both partners contributed to the codebase
Comprehension questions Yes
General
Business Logic in Models No - I think a lot of the logic you put in the rentals controller would make sense in the Rental model. For example, the logic in the overdue controller to find the list of overdue rentals. It would be better to have a model method that is Rental.overdue which would contain the logic for determining whether or not something was overdue.
All 3 required endpoints return expected JSON data Yes
Requests respond with appropriate HTTP Status Code Yes - you did a good job covering the status code for each request
Errors are reported Yes
Testing
Passes all Smoke Tests Yes
Model Tests - all relations, validations, and custom functions test positive & negative cases Yes
Controller Tests - URI parameters and data in the request body have positive & negative cases Yes - your rental tests look good. Note there was one test checking against a hard-coded value so it would be better to do a comparison instead (line 95)
Optionals
POST routes use URI parameter and request body to add a new record to the database Yes. Not there is some opportunity for improvement as you are calling save but never checking the result (for the movie).
GET /customers shows how many movies are checked out by a customer N/A
GET /movies/:title shows updated inventory N/A
Overall Nice job focusing on coding and testing the failure scenarios

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.

5 participants