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

Jessica Owens, Shaunna Wiens --carets #21

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

Conversation

skwiens
Copy link

@skwiens skwiens commented Nov 9, 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 first created an ERD with no relationships based on our seed data. Once we began the optionals with rentals we decided the customers had many rentals and movies had many rentals. Rentals belonged to a customer and a movie.
Describe a set of positive and negative test cases you implemented for a model. We tested the ability to rent or return movies beyond their inventory or out.
Describe a set of positive and negative test cases you implemented for a controller. For our rental controller we implemented success cases for returning a movie requiring that the rental was found and the movie was currently out as well as non success cases when these conditions weren't met.
How does your API respond when bad data is sent to it? When bad data is sent to our API it responds with :bad_request
Describe one of your custom model methods and why you chose to wrap that functionality into a method. One of our custom model methods is to rent a movie and return a movie which changes the count of movies out. We did this in the model because it is business logic.
Do you have any recommendations on how we could improve this project for the next cohort? Nope. It was great.
Link to Trello We didn't remember to do this...but we could make a fake one if you'd like?
Link to ERD https://www.lucidchart.com/invitations/accept/4f3dfd2a-4148-43c4-bea4-1e95962af029

vertige and others added 30 commits November 6, 2017 12:43
@CheezItMan
Copy link

Video Store

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene Good commit messages and # of commits. Both team members added commits
Comprehension questions Check
General
Business Logic in Models Well done
All 3 required endpoints return expected JSON data Check, except the # of movies checked out for customers
Requests respond with appropriate HTTP Status Code Check
Errors are reported Error not reported in the response JSON
Testing
Passes all Smoke Tests Almost all
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 Check well done
POST routes use URI parameter and request body to add a new record to the database Check
Optionals
GET /movies/:id shows updated inventory Well done!
Overall You hit most of the requirements. Nicely done.

customers = Customer.all

render json:
customers.as_json(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... no # of checked out movies

if movie.save
render json: movie.as_json(only: [:id]), status: :ok
else
render json: { ok: false }, status: :bad_request

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also include the errors hash messages in the JSON

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