@@ -224,7 +224,7 @@ describe('Server', function () {
224224 } )
225225 } )
226226
227- describe ( 'GET /:resource?attr>=&attr< =' , function ( ) {
227+ describe ( 'GET /:resource?attr_gte=&attr_lte =' , function ( ) {
228228 it ( 'should respond with a limited array' , function ( done ) {
229229 request ( server )
230230 . get ( '/comments?id_gte=2&id_lte=3' )
@@ -234,6 +234,16 @@ describe('Server', function () {
234234 } )
235235 } )
236236
237+ describe ( 'GET /:resource?attr_ne=' , function ( ) {
238+ it ( 'should respond with a limited array' , function ( done ) {
239+ request ( server )
240+ . get ( '/comments?id_ne=1' )
241+ . expect ( 'Content-Type' , / j s o n / )
242+ . expect ( db . comments . slice ( 1 ) )
243+ . expect ( 200 , done )
244+ } )
245+ } )
246+
237247 describe ( 'GET /:parent/:parentId/:resource' , function ( ) {
238248 it ( 'should respond with json and corresponding nested resources' , function ( done ) {
239249 request ( server )
@@ -407,6 +417,17 @@ describe('Server', function () {
407417 } )
408418 } )
409419
420+ describe ( 'POST /:parent/:parentId/:resource' , function ( ) {
421+ it ( 'should respond with json and set parentId' , function ( done ) {
422+ request ( server )
423+ . post ( '/posts/1/comments' )
424+ . send ( { body : 'foo' } )
425+ . expect ( 'Content-Type' , / j s o n / )
426+ . expect ( { id : 6 , postId : 1 , body : 'foo' } )
427+ . expect ( 201 , done )
428+ } )
429+ } )
430+
410431 describe ( 'PUT /:resource/:id' , function ( ) {
411432 it ( 'should respond with json and replace resource' , function ( done ) {
412433 var post = { id : 1 , booleanValue : true , integerValue : 1 }
0 commit comments