Add X-Count header when slicing collection

This commit is contained in:
Emmanuel Quentin
2014-08-26 13:35:15 +02:00
parent 96f2112231
commit daf3da70e0
2 changed files with 13 additions and 6 deletions

View File

@ -61,7 +61,11 @@ describe('Server', function() {
.get('/comments?_start=1&_end=2')
.expect('Content-Type', /json/)
.expect(low.db.comments.slice(1, 2))
.expect(200, done)
.expect(200)
.end(function(err, res){
assert.equal(res.headers['x-count'], 5)
done()
})
})
})
@ -171,4 +175,4 @@ describe('Server', function() {
});
})
})
})