@@ -92,9 +92,9 @@ describe('Server', function() {
92
92
it ( 'should respond with json and create a resource' , function ( done ) {
93
93
request ( server )
94
94
. post ( '/posts' )
95
- . send ( { body : 'foo' } )
95
+ . send ( { body : 'foo' , booleanValue : 'true' , integerValue : '1' } )
96
96
. expect ( 'Content-Type' , / j s o n / )
97
- . expect ( { id : 3 , body : 'foo' } )
97
+ . expect ( { id : 3 , body : 'foo' , booleanValue : true , integerValue : 1 } )
98
98
. expect ( 200 )
99
99
. end ( function ( err , res ) {
100
100
if ( err ) return done ( err )
@@ -108,13 +108,13 @@ describe('Server', function() {
108
108
it ( 'should respond with json and update resource' , function ( done ) {
109
109
request ( server )
110
110
. put ( '/posts/1' )
111
- . send ( { id : 1 , body : 'foo ' } )
111
+ . send ( { id : 1 , body : 'bar' , booleanValue : 'true' , integerValue : '1 '} )
112
112
. expect ( 'Content-Type' , / j s o n / )
113
- . expect ( { id : 1 , body : 'foo' } )
113
+ . expect ( { id : 1 , body : 'bar' , booleanValue : true , integerValue : 1 } )
114
114
. expect ( 200 )
115
115
. end ( function ( err , res ) {
116
116
if ( err ) return done ( err )
117
- assert . deepEqual ( low . db . posts [ 0 ] , { id : 1 , body : 'foo' } )
117
+ assert . deepEqual ( low . db . posts [ 0 ] , { id : 1 , body : 'bar' , booleanValue : true , integerValue : 1 } )
118
118
done ( )
119
119
} )
120
120
} )
0 commit comments