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

Sara and Jocelyn -- Carets #23

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

Sara and Jocelyn -- Carets #23

wants to merge 17 commits into from

Conversation

jocegonz
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 didn't see the design of the ERD as concrete until we implemented basic optional functionality. The seed data of customers and movies aren't connected until we utilize the rental object as an intermediary.
Describe a set of positive and negative test cases you implemented for a model. We tested the a customer object would continue to be invalid until we added all the required information.
Describe a set of positive and negative test cases you implemented for a controller. A negative test for the customers controller is when we returned an empty array if we had no customers. A positive test is testing for the required fields when we do have customers.
How does your API respond when bad data is sent to it? It depends on the controller. If a bad request is sent to movies show, it returns a not found. In create, this will return a bad request.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. We didn't get to this point.
Do you have any recommendations on how we could improve this project for the next cohort? Maybe it would be good to explain the benefits of an ERD when the objects aren't yet connected.
Link to Trello https://trello.com/b/hbazJLAs/videostoreapi
Link to ERD erd.pdf. This can found in the main file path of our project :)

@tildeee
Copy link

tildeee commented Nov 17, 2017

Video Store

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene x
Comprehension questions x
General
Business Logic in Models no business logic besides validations (which is okay!)
All 3 required endpoints return expected JSON data x
Requests respond with appropriate HTTP Status Code x
Errors are reported x
Testing
Passes all Smoke Tests x
Model Tests - all relations, validations, and custom functions test positive & negative cases making a comment on suggestions, but otherwise yes and all there
Controller Tests - URI parameters and data in the request body have positive & negative cases didn't get to RentalsController tests. Could have tested in MoviesController what if the index route had no movies. Otherwise yes and all there
Optionals
POST routes use URI parameter and request body to add a new record to the database
GET /customers shows how many movies are checked out by a customer
GET /movies/:title shows updated inventory
Overall

customer.city = "Radtown"
customer.state = "WAtever"

customer.valid?.must_equal true
Copy link

Choose a reason for hiding this comment

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

I know it's a pain, but it's way more accurate to have separate tests that test each field on their own!

Start with a valid customer (like customer_one in this test), and then in each test take away one field and test that customer_one.valid?.must_equal false. Here, you started with an invalid object and kept adding until it was valid-- try going in the opposite direction.

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