This commit is contained in:
Typicode
2014-03-21 17:18:54 +01:00
parent 681e6fcf02
commit ca775b7544
9 changed files with 245 additions and 172 deletions

View File

@ -52,6 +52,16 @@ describe('Server', function() {
})
})
describe.only('GET /:resource?_start=&_end=', function() {
it('should respond with sliced array', function(done) {
request(server)
.get('/comments?_start=1&_end=2')
.expect('Content-Type', /json/)
.expect(low.db.comments.slice(1, 2))
.expect(200, done)
})
})
describe('GET /:parent/:parentId/:resource', function() {
it('should respond with json and corresponding nested resources', function(done) {
request(server)