-
Notifications
You must be signed in to change notification settings - Fork 24
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
Julia & Victoria -- Carets #12
base: master
Are you sure you want to change the base?
Conversation
…setting movies_checked_out_count
…sts. passes smoke tests in postman
… need to be fixed
…index method in customers controller to use this method
Video StoreWhat We're Looking For
|
|
||
describe Customer do | ||
|
||
it "a customer object can be saved to the database" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So no validations for Customers?
class Customer < ApplicationRecord | ||
has_many :rentals | ||
|
||
def self.index_customers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting method to create the JSON, why not use a serializer?
|
||
describe Movie do | ||
|
||
it "a movie object can be saved to the database" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
negative tests? What about when the inventory, or available inventory is 0. Can you create a movie with negative inventory?
body["id"].must_be_instance_of Integer | ||
end | ||
|
||
it "cannot save a duplicate movie (same title)" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about if the value posted is missing some needed fields?
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
|