11describe ( 'DSSqlAdapter#updateAll' , function ( ) {
22 it ( 'should update all items' , function ( ) {
33 var id , id2 ;
4- return adapter . create ( User , { name : 'John' , age : 20 } )
4+ return adapter . create ( User , { name : 'John' , age : 20 } )
55 . then ( function ( user ) {
66 id = user . id ;
7- return adapter . create ( User , { name : 'John' , age : 30 } ) ;
7+ return adapter . create ( User , { name : 'John' , age : 30 } ) ;
88 } ) . then ( function ( user ) {
99 id2 = user . id ;
1010 return adapter . findAll ( User , {
@@ -14,7 +14,12 @@ describe('DSSqlAdapter#updateAll', function () {
1414 users . sort ( function ( a , b ) {
1515 return a . age - b . age ;
1616 } ) ;
17- assert . deepEqual ( users , [ { id : id , name : 'John' , age : 20 , profileId : null } , { id : id2 , name : 'John' , age : 30 , profileId : null } ] ) ;
17+ assert . equalObjects ( users , [ { id : id , name : 'John' , age : 20 , profileId : null } , {
18+ id : id2 ,
19+ name : 'John' ,
20+ age : 30 ,
21+ profileId : null
22+ } ] ) ;
1823 return adapter . updateAll ( User , {
1924 name : 'Johnny'
2025 } , {
@@ -24,12 +29,17 @@ describe('DSSqlAdapter#updateAll', function () {
2429 users . sort ( function ( a , b ) {
2530 return a . age - b . age ;
2631 } ) ;
27- assert . deepEqual ( users , [ { id : id , name : 'Johnny' , age : 20 , profileId : null } , { id : id2 , name : 'Johnny' , age : 30 , profileId : null } ] ) ;
32+ assert . equalObjects ( users , [ { id : id , name : 'Johnny' , age : 20 , profileId : null } , {
33+ id : id2 ,
34+ name : 'Johnny' ,
35+ age : 30 ,
36+ profileId : null
37+ } ] ) ;
2838 return adapter . findAll ( User , {
2939 name : 'John'
3040 } ) ;
3141 } ) . then ( function ( users ) {
32- assert . deepEqual ( users , [ ] ) ;
42+ assert . equalObjects ( users , [ ] ) ;
3343 assert . equal ( users . length , 0 ) ;
3444 return adapter . findAll ( User , {
3545 name : 'Johnny'
@@ -38,7 +48,12 @@ describe('DSSqlAdapter#updateAll', function () {
3848 users . sort ( function ( a , b ) {
3949 return a . age - b . age ;
4050 } ) ;
41- assert . deepEqual ( users , [ { id : id , name : 'Johnny' , age : 20 , profileId : null } , { id : id2 , name : 'Johnny' , age : 30 , profileId : null } ] ) ;
51+ assert . equalObjects ( users , [ { id : id , name : 'Johnny' , age : 20 , profileId : null } , {
52+ id : id2 ,
53+ name : 'Johnny' ,
54+ age : 30 ,
55+ profileId : null
56+ } ] ) ;
4257 return adapter . destroyAll ( User ) ;
4358 } ) . then ( function ( destroyedUser ) {
4459 assert . isFalse ( ! ! destroyedUser ) ;
0 commit comments