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

Queues - Cara and Allison - VideoStoreAPI #7

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
8c0bf61
created movie, customer and rental databases
Allison-Northrop May 9, 2017
c3647c9
added relationships in models
Allison-Northrop May 9, 2017
0198dfd
modified rental tes
Allison-Northrop May 9, 2017
c6f5145
Write validations for movie model
cecomfort May 9, 2017
ddf7dbf
Write validations for movie model
cecomfort May 9, 2017
4dc6ef6
Fix merge conflict
cecomfort May 9, 2017
283e5e6
added validation for customer model
Allison-Northrop May 9, 2017
7759891
added rental validations
Allison-Northrop May 9, 2017
dd0af83
Add fixtures for movie and customer
cecomfort May 9, 2017
8a5c0a3
added rental yml files
Allison-Northrop May 9, 2017
7b7675c
fixed merge conflict
Allison-Northrop May 9, 2017
20ec181
phone and number validations for customer passing
Allison-Northrop May 9, 2017
f47852f
Write test for movie relations
cecomfort May 9, 2017
22c53d1
Write test for customer relations
cecomfort May 9, 2017
95b64f1
all customer validation tests passing
Allison-Northrop May 9, 2017
b20b5c9
Write tests for movie validations
cecomfort May 9, 2017
b726aba
added rental tests
Allison-Northrop May 9, 2017
ea62546
fixed merge conflict
Allison-Northrop May 10, 2017
ac3b20f
Fix test errors
cecomfort May 10, 2017
886477f
added rental test belongs to movie
Allison-Northrop May 10, 2017
e08c772
Define routes for movies index, customers index, and movies show
cecomfort May 10, 2017
eee9fbf
Generate controllers for movies and customers
cecomfort May 10, 2017
51f8231
Write index method for movies controller, add movie serializer
cecomfort May 10, 2017
0780cb5
Add show method for movies controller and implement movie serializer …
cecomfort May 10, 2017
0418a8f
created serializer for customer
Allison-Northrop May 10, 2017
8dac9c0
added method in customer model for movie count
Allison-Northrop May 10, 2017
db42bd4
Modify movie show method so based on movie title not id
cecomfort May 10, 2017
3885255
Add statuses and error messages for movie controller methods
cecomfort May 10, 2017
60d2666
added status ok for customer index
Allison-Northrop May 10, 2017
43b9b95
wrote an customer index test that passes
Allison-Northrop May 10, 2017
940d623
all customer controller tests passing
Allison-Northrop May 10, 2017
244bdab
Write movie controller tests
cecomfort May 10, 2017
a34d8e1
Merge branch 'master' of https://github.com/Allison-Northrop/VideoSto…
cecomfort May 10, 2017
f42d71e
Add returned boolean to rental model and set it to false by default
cecomfort May 12, 2017
4d29d66
Write checkout method to add functionality to checkout a movie
cecomfort May 12, 2017
5d20e33
added reduce_inventory method in movie model and added rental control…
Allison-Northrop May 12, 2017
4e8cf07
Implemented changing available inventory instead of inventory when ch…
cecomfort May 12, 2017
3ce9998
refactored checkin so that a person can check out and check in the sa…
Allison-Northrop May 12, 2017
a75477c
Work on tests for rentals controller checkin method
cecomfort May 12, 2017
a89db44
wrote some tests for rentals controller
Allison-Northrop May 12, 2017
6fad66e
fixed merge conflict
Allison-Northrop May 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
all customer validation tests passing
Allison-Northrop committed May 9, 2017

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 95b64f19325ac6e449ae76a2585178783ad791de
19 changes: 19 additions & 0 deletions test/models/customer_test.rb
Original file line number Diff line number Diff line change
@@ -16,5 +16,24 @@
customer.errors.messages.must_include :phone
end

it "requires a postal code" do
customer = Customer.create
result = customer.valid?
result.must_equal false
customer.errors.messages.must_include :postal_code
end

it "checks the length isn't greater than 5 for the postal code" do
customer = Customer.create(postal_code: "9832928938")
result = customer.valid?
result.must_equal false
end

it "checks the length of the postal code is not less than 5" do
customer = Customer.create(postal_code: "9")
result = customer.valid?
result.must_equal false
end

end
end