File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -140,19 +140,22 @@ function tests(dbName, dbType) {
140
140
} ) ;
141
141
142
142
it ( 'skips deleted docs' , function ( ) {
143
- db . transform ( {
144
- incoming : function ( doc ) {
145
- doc . foo . baz = 'baz' ;
146
- return doc ;
147
- }
148
- } ) ;
149
143
var doc = { _id : 'foo' , foo : { } } ;
150
144
return db . put ( doc ) . then ( function ( res ) {
151
145
doc . _rev = res . rev ;
152
146
return db . get ( 'foo' ) ;
153
147
} ) . then ( function ( doc ) {
154
- doc . foo . baz . should . equal ( 'baz' ) ;
155
- return db . remove ( doc ) ;
148
+ var transformCalledOnDelete = false ;
149
+ db . transform ( {
150
+ incoming : function ( doc ) {
151
+ transformCalledOnDelete = true ;
152
+ return doc ;
153
+ }
154
+ } ) ;
155
+
156
+ return db . remove ( doc ) . then ( function ( ) {
157
+ transformCalledOnDelete . should . equal ( false ) ;
158
+ } ) ;
156
159
} ) ;
157
160
} ) ;
158
161
You can’t perform that action at this time.
0 commit comments