Skip to content
Open
Changes from 1 commit
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
b10191e
Wrote pseudocode for routes.
jadevance Jun 14, 2016
7e69068
Added in Massive
jadevance Jun 14, 2016
f80ff64
added db and db/setup dirs, added scripts for setups in the package.j…
JBoshart Jun 14, 2016
fe3633f
omg it works
jadevance Jun 14, 2016
3f994c9
added high level routes for customers, movies and rentals
jadevance Jun 15, 2016
bbec298
Added tasks folder with load schema functionality
jadevance Jun 15, 2016
448164b
Pushing broken code so we can work on it tonight: Most of the work do…
JBoshart Jun 15, 2016
a46f4b2
Changed some things?
jadevance Jun 16, 2016
e0611b6
merge conflicts
jadevance Jun 16, 2016
bb8ed63
Seed.js is now working.
JBoshart Jun 16, 2016
df311ed
Added schema for rentals database.
JBoshart Jun 16, 2016
cf69655
Added ERD to git.
JBoshart Jun 16, 2016
9aa4d2b
added setup for the database in app.js
jadevance Jun 16, 2016
e929b92
added a models folder as well as model function to find all customers
jadevance Jun 16, 2016
cc7ebf3
wrote a method in the video controller to find all customers in the d…
jadevance Jun 16, 2016
de5b757
forgot to reference the model in the controller. Fixed that. Renamed …
jadevance Jun 16, 2016
944c7a9
resolved merge conflict.
JBoshart Jun 16, 2016
38d4c13
Added module.exports to app
jadevance Jun 16, 2016
e4ff73c
required massive and cleaned up errors
jadevance Jun 16, 2016
22e7117
Fixed a syntax error that broke everything
jadevance Jun 17, 2016
fca5fdd
Switching drivers. Working on getting JSON response.
JBoshart Jun 17, 2016
4117137
endpoint customers is now serving up customer data in JSON
jadevance Jun 17, 2016
1dc233a
renamed video.js to customers.js to split out the functionality of cu…
jadevance Jun 17, 2016
a1f4b7f
Organizational changes only.
JBoshart Jun 17, 2016
7e73318
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
JBoshart Jun 17, 2016
22c9cc3
More org changes.
JBoshart Jun 17, 2016
e704d83
Added functionality for sorting customers
jadevance Jun 17, 2016
59ed614
managing merge conflicts
jadevance Jun 17, 2016
dd0eabe
Customers can be sorted now and the return is JSON data. yay
jadevance Jun 17, 2016
dc60de7
Set h1 for funsies.
JBoshart Jun 17, 2016
3ff63c7
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
JBoshart Jun 17, 2016
ef395bf
Made models and controllers for rentals and videos.
JBoshart Jun 17, 2016
dacb023
added seed data for rentals database, and adjusted seeding code.
JBoshart Jun 17, 2016
2b4eeda
broke out routes for clarity (and because express had callback issues…
jadevance Jun 17, 2016
b259277
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
jadevance Jun 17, 2016
65ab567
work in rentals model and controller.
JBoshart Jun 17, 2016
e18f050
fixed routing where it was nested one level too deep (/customers/cust…
jadevance Jun 17, 2016
75164a2
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
jadevance Jun 17, 2016
ef2faa5
Working on Rentals.find in controller.
JBoshart Jun 17, 2016
3c56b1f
routes
jadevance Jun 17, 2016
a2faf4f
still. with. rentals. find. :(
JBoshart Jun 17, 2016
8ca4618
merge conflicts manages in app.js and rentals controller
jadevance Jun 17, 2016
b87aea8
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
jadevance Jun 17, 2016
2970cb0
Completed the find_current rentals funciton in model and contorller. …
JBoshart Jun 17, 2016
e41e909
friday changes, honestly do not remember what was changed
jadevance Jun 20, 2016
8a017c0
added istanbul and managed a merge conflict with rentals routes
jadevance Jun 20, 2016
f74c963
Added more seed data inorder to test sorting function of rentals hist…
JBoshart Jun 20, 2016
4da9636
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
JBoshart Jun 20, 2016
37ab377
Added null seeds for checkin and modified the models sql query to ret…
jadevance Jun 20, 2016
0241bc0
Added coverage to the gitignore file
jadevance Jun 20, 2016
c80b182
resolving errors that occured when coverage/ was not in our git ignore.
JBoshart Jun 20, 2016
c7c524c
Trying to resolved merge
JBoshart Jun 20, 2016
4162e25
Added node modules to the .gitignore
jadevance Jun 20, 2016
23a8b4d
video_current now returns the customers who currently have a particul…
JBoshart Jun 20, 2016
ee69dd8
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
JBoshart Jun 20, 2016
3ae103b
Wrote a function, route and model method for finding the rental histo…
jadevance Jun 20, 2016
857b62b
Wrote functionality for funding a list of customers who have currentl…
jadevance Jun 20, 2016
f450b9b
Worked on adding checkout functionality to our video store. Routing n…
jadevance Jun 21, 2016
fd2f0c5
debugging code, have the first two pieces of checkout working but the…
jadevance Jun 21, 2016
61d640f
Created a constructor function to test checkout rentals
jadevance Jun 21, 2016
a155863
Fixed date and time
jadevance Jun 21, 2016
de7a513
Worked on rentals checkin function.
JBoshart Jun 21, 2016
7221273
Debugging work on checking process.
JBoshart Jun 21, 2016
85797a9
Checkin function is now working
JBoshart Jun 21, 2016
1a25dd2
Fixed error handling to display json rather than render a view for er…
jadevance Jun 21, 2016
34aa7a5
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
jadevance Jun 21, 2016
76fcb75
Wrote error handling for customers, cleaned up unused code
jadevance Jun 21, 2016
b5cb520
added video error handling
jadevance Jun 21, 2016
1fcd557
Working on overdue rentals.
JBoshart Jun 21, 2016
9fc2fc3
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
JBoshart Jun 21, 2016
b715f0f
Wrote tests for the videos controller (renamed from movies for clarit…
jadevance Jun 22, 2016
92a93db
Added tests for customers controller.
jadevance Jun 22, 2016
070171c
Wrote some tests for the rentals controller
jadevance Jun 22, 2016
d537234
Merging tests with local
JBoshart Jun 22, 2016
72dfb1b
overdue function for rentals is now working.
JBoshart Jun 22, 2016
21fc575
Added model specs and cleaned up error responses in the controllers
jadevance Jun 22, 2016
33fe746
Made rentals#overdue tests, as well as model spec directory.
JBoshart Jun 22, 2016
cf20434
isolated the failing test and it is currently x and commented out in …
jadevance Jun 22, 2016
45c0130
Managing merge conflicts, commented out tests that do not currently work
jadevance Jun 23, 2016
33e1b27
Fixed failing test, endpoint had a typo
jadevance Jun 23, 2016
c5bc420
writing model tests for customers
jadevance Jun 23, 2016
b08e506
Added in package.json command to clean up test coverage reports
jadevance Jun 23, 2016
f54b3b2
Added new testing command to package.json.
JBoshart Jun 23, 2016
db2982b
Added tests to the rental models spec for find_current and find_history.
JBoshart Jun 23, 2016
6995b8f
Added tests to rentals model spec for .overdue.
JBoshart Jun 23, 2016
d08365a
Added tests to rentals model spec for .video_current.
JBoshart Jun 23, 2016
3ae0f78
Added tests to rentals model spec for .video_current, more will need …
JBoshart Jun 23, 2016
83e3f06
Wrote a sorting function for rentals to return JSON data sorted by name
jadevance Jun 23, 2016
345ad66
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
JBoshart Jun 23, 2016
d451759
added notes to remind us to address checkout date
jadevance Jun 23, 2016
c0506d2
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
jadevance Jun 23, 2016
9b7606e
Handled checkout date logic for sorting
jadevance Jun 23, 2016
d55204e
More tests in progress.
JBoshart Jun 23, 2016
9f7da07
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
JBoshart Jun 23, 2016
d808692
Sorting tests for find_video_history
JBoshart Jun 23, 2016
dd5593c
Wrote tests for video model. I think we should write some tests for .…
JBoshart Jun 23, 2016
4f0e70e
error handling tests for models controllers is now in place and at 91…
JBoshart Jun 24, 2016
dfdf543
customers spec is now testing at 94% coverage.
JBoshart Jun 24, 2016
a373466
wrote tests for rentals to handle error handling
jadevance Jun 24, 2016
fae25cf
cleaning up the files
jadevance Jun 24, 2016
34d7557
Removed views that were not being used. Added Api Documentation.
JBoshart Jun 24, 2016
ceba217
Merge branch 'master' of github.com:JBoshart/VideoStoreAPI
JBoshart Jun 24, 2016
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
writing model tests for customers
  • Loading branch information
jadevance committed Jun 23, 2016
commit c5bc42011c3ffa7aa2cf37e5db93f299b1bc49cd
29 changes: 29 additions & 0 deletions spec/models/customers.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
var app = require('../../app')
var db = app.get('db')
var Customer = require('../../models/customers')

//mock customer data
describe('Customer', function () {
var customer_test = "Gideon Defoe"
var registered_at_test = "Mon, 15 Feb 2015 09:00:14 -0700"
var address_test = '1234 Electric Avenue'
var city_test = "London"
var state_test = "Texas"
var postal_code_test = "76854"
var phone_test = "(325) 237-4026"
var account_credit_test = "75.12"

afterEach(function () {
db.end()
})


describe('#all', function () {
it('should return all customers', function (done) {
Customer.all(function (error, customers) {
expect(customers.length).toEqual(200)
done()
})
})
})
})