Rename sortDir to order

This commit is contained in:
Typicode
2014-10-18 18:49:52 +02:00
parent cc248a5f47
commit b86bb22c07
2 changed files with 7 additions and 7 deletions

View File

@ -104,9 +104,9 @@ describe('Server', function() {
.expect(200, done)
})
it('should reverse sorting with sortDir=DESC', function(done) {
it('should reverse sorting with order=DESC', function(done) {
request(server)
.get('/tags?_sort=body&_sortDir=DESC')
.get('/tags?_sort=body&_order=DESC')
.expect('Content-Type', /json/)
.expect([db.tags[2], db.tags[0], db.tags[1]])
.expect(200, done)
@ -114,7 +114,7 @@ describe('Server', function() {
it('should sort on numerical field', function(done) {
request(server)
.get('/posts?_sort=id&_sortDir=DESC')
.get('/posts?_sort=id&_order=DESC')
.expect('Content-Type', /json/)
.expect(db.posts.reverse())
.expect(200, done)