@@ -1360,6 +1360,7 @@ module.exports = function(dataSource, should, connectorCapabilities) {
13601360
13611361 ctxRecorder . records . should . eql ( aCtxForModel ( TestModel , {
13621362 data : { name : 'changed' } ,
1363+ isNewInstance : false ,
13631364 } ) ) ;
13641365
13651366 done ( ) ;
@@ -2039,25 +2040,13 @@ module.exports = function(dataSource, should, connectorCapabilities) {
20392040 { id : existingInstance . id , name : 'updated name' } ,
20402041 function ( err , instance ) {
20412042 if ( err ) return done ( err ) ;
2042-
2043- if ( dataSource . connector . updateOrCreate ) {
2044- ctxRecorder . records . should . eql ( aCtxForModel ( TestModel , {
2045- data : {
2046- id : existingInstance . id ,
2047- name : 'updated name' ,
2048- } ,
2049- isNewInstance : false ,
2050- } ) ) ;
2051- } else {
2052- ctxRecorder . records . should . eql (
2053- aCtxForModel ( TestModel , {
2054- data : {
2055- id : existingInstance . id ,
2056- name : 'updated name' ,
2057- } ,
2058- } )
2059- ) ;
2060- }
2043+ ctxRecorder . records . should . eql ( aCtxForModel ( TestModel , {
2044+ data : {
2045+ id : existingInstance . id ,
2046+ name : 'updated name' ,
2047+ } ,
2048+ isNewInstance : false ,
2049+ } ) ) ;
20612050 done ( ) ;
20622051 } ) ;
20632052 } ) ;
@@ -3267,13 +3256,8 @@ module.exports = function(dataSource, should, connectorCapabilities) {
32673256 id : existingInstance . id ,
32683257 name : 'updated name' ,
32693258 } ,
3259+ isNewInstance : false ,
32703260 } ) ;
3271- // For non-atomic implementation of upsertWithWhere on update, it calls
3272- // updateAttributes. loaded hook of updateAttributes does not provide
3273- // isNewInstance.
3274- if ( dataSource . connector . upsertWithWhere ) {
3275- expectedContext . isNewInstance = false ;
3276- }
32773261 ctxRecorder . records . should . eql ( aCtxForModel ( TestModel , expectedContext ) ) ;
32783262 done ( ) ;
32793263 } ) ;
0 commit comments