@@ -15,14 +15,14 @@ describe('include option', function () {
1515 Post = ds . createModel ( 'post' , { title : String } ) ;
1616 app . model ( Post ) ;
1717 Post . customMethod = function ( cb ) {
18- cb ( null , { prop : 'value' } ) ;
18+ cb ( null , { prop : 'value' , id : null } ) ;
1919 } ;
2020 Post . remoteMethod ( 'customMethod' , {
2121 http : { verb : 'get' , path : '/custom' } ,
2222 returns : { root : true }
2323 } ) ;
2424 Post . customMethod2 = function ( cb ) {
25- cb ( null , { prop : 'value' } ) ;
25+ cb ( null , { prop : 'value' , id : null } ) ;
2626 } ;
2727 Post . remoteMethod ( 'customMethod2' , {
2828 http : { verb : 'get' , path : '/custom2' } ,
@@ -32,7 +32,7 @@ describe('include option', function () {
3232 Comment = ds . createModel ( 'comment' , { comment : String } ) ;
3333 app . model ( Comment ) ;
3434 Comment . customMethod = function ( cb ) {
35- cb ( null , { prop : 'value' } ) ;
35+ cb ( null , { prop : 'value' , id : null } ) ;
3636 } ;
3737 Comment . remoteMethod ( 'customMethod' , {
3838 http : { verb : 'get' , path : '/custom' } ,
@@ -60,7 +60,7 @@ describe('include option', function () {
6060 . expect ( 200 )
6161 . end ( function ( err , res ) {
6262 expect ( err ) . to . equal ( null ) ;
63- expect ( res . body . data ) . to . have . keys ( 'type' , 'attributes' , 'links' ) ;
63+ expect ( res . body . data ) . to . have . keys ( 'id' , ' type', 'attributes' , 'links' ) ;
6464 done ( ) ;
6565 } ) ;
6666 } ) ;
@@ -70,7 +70,7 @@ describe('include option', function () {
7070 . expect ( 200 )
7171 . end ( function ( err , res ) {
7272 expect ( err ) . to . equal ( null ) ;
73- expect ( res . body . data ) . to . have . keys ( 'type' , 'attributes' , 'links' ) ;
73+ expect ( res . body . data ) . to . have . keys ( 'id' , ' type', 'attributes' , 'links' ) ;
7474 done ( ) ;
7575 } ) ;
7676 } ) ;
@@ -90,7 +90,7 @@ describe('include option', function () {
9090 . expect ( 200 )
9191 . end ( function ( err , res ) {
9292 expect ( err ) . to . equal ( null ) ;
93- expect ( res . body . data ) . to . have . keys ( 'type' , 'attributes' , 'links' ) ;
93+ expect ( res . body . data ) . to . have . keys ( 'id' , ' type', 'attributes' , 'links' ) ;
9494 done ( ) ;
9595 } ) ;
9696 } ) ;
@@ -100,7 +100,7 @@ describe('include option', function () {
100100 . expect ( 200 )
101101 . end ( function ( err , res ) {
102102 expect ( err ) . to . equal ( null ) ;
103- expect ( res . body ) . to . deep . equal ( { prop : 'value' } ) ;
103+ expect ( res . body ) . to . deep . equal ( { prop : 'value' , id : null } ) ;
104104 done ( ) ;
105105 } ) ;
106106 } ) ;
@@ -120,7 +120,7 @@ describe('include option', function () {
120120 . expect ( 200 )
121121 . end ( function ( err , res ) {
122122 expect ( err ) . to . equal ( null ) ;
123- expect ( res . body . data ) . to . have . keys ( 'type' , 'attributes' , 'links' ) ;
123+ expect ( res . body . data ) . to . have . keys ( 'id' , ' type', 'attributes' , 'links' ) ;
124124 done ( ) ;
125125 } ) ;
126126 } ) ;
@@ -130,7 +130,7 @@ describe('include option', function () {
130130 . expect ( 200 )
131131 . end ( function ( err , res ) {
132132 expect ( err ) . to . equal ( null ) ;
133- expect ( res . body . data ) . to . have . keys ( 'type' , 'attributes' , 'links' ) ;
133+ expect ( res . body . data ) . to . have . keys ( 'id' , ' type', 'attributes' , 'links' ) ;
134134 done ( ) ;
135135 } ) ;
136136 } ) ;
0 commit comments