mirror of
https://github.com/typicode/json-server.git
synced 2025-08-03 04:12:22 +08:00
Add "not equal" operator
This commit is contained in:
@ -224,7 +224,7 @@ describe('Server', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('GET /:resource?attr>=&attr<=', function () {
|
||||
describe('GET /:resource?attr_gte=&attr_lte=', function () {
|
||||
it('should respond with a limited array', function (done) {
|
||||
request(server)
|
||||
.get('/comments?id_gte=2&id_lte=3')
|
||||
@ -234,6 +234,16 @@ describe('Server', function () {
|
||||
})
|
||||
})
|
||||
|
||||
describe('GET /:resource?attr_ne=', function () {
|
||||
it('should respond with a limited array', function (done) {
|
||||
request(server)
|
||||
.get('/comments?id_ne=1')
|
||||
.expect('Content-Type', /json/)
|
||||
.expect(db.comments.slice(1))
|
||||
.expect(200, done)
|
||||
})
|
||||
})
|
||||
|
||||
describe('GET /:parent/:parentId/:resource', function () {
|
||||
it('should respond with json and corresponding nested resources', function (done) {
|
||||
request(server)
|
||||
|
Reference in New Issue
Block a user