@@ -3140,7 +3140,7 @@ describe('Parse.Query testing', () => {
3140
3140
} ) ;
3141
3141
3142
3142
it ( 'select keys query' , function ( done ) {
3143
- const obj = new TestObject ( { foo : 'baz' , bar : 1 } ) ;
3143
+ const obj = new TestObject ( { foo : 'baz' , bar : 1 , qux : 2 } ) ;
3144
3144
3145
3145
obj
3146
3146
. save ( )
@@ -3157,23 +3157,28 @@ describe('Parse.Query testing', () => {
3157
3157
ok ( ! result . dirty ( ) , 'expected result not to be dirty' ) ;
3158
3158
strictEqual ( result . get ( 'foo' ) , 'baz' ) ;
3159
3159
strictEqual ( result . get ( 'bar' ) , undefined , "expected 'bar' field to be unset" ) ;
3160
+ strictEqual ( result . get ( 'qux' ) , undefined , "expected 'qux' field to be unset" ) ;
3160
3161
return result . fetch ( ) ;
3161
3162
} )
3162
3163
. then ( function ( result ) {
3163
3164
strictEqual ( result . get ( 'foo' ) , 'baz' ) ;
3164
3165
strictEqual ( result . get ( 'bar' ) , 1 ) ;
3166
+ strictEqual ( result . get ( 'qux' ) , 2 ) ;
3165
3167
} )
3166
3168
. then ( function ( ) {
3167
3169
obj . _clearServerData ( ) ;
3168
3170
const query = new Parse . Query ( TestObject ) ;
3169
- query . select ( [ ] ) ;
3171
+ query . select ( [ 'foo' ] ) ;
3170
3172
return query . first ( ) ;
3171
3173
} )
3172
3174
. then ( function ( result ) {
3173
3175
ok ( result . id , 'expected object id to be set' ) ;
3176
+ ok ( result . createdAt , 'expected object createdAt to be set' ) ;
3177
+ ok ( result . updatedAt , 'expected object updatedAt to be set' ) ;
3174
3178
ok ( ! result . dirty ( ) , 'expected result not to be dirty' ) ;
3175
- strictEqual ( result . get ( 'foo' ) , undefined , "expected 'foo' field to be unset" ) ;
3179
+ strictEqual ( result . get ( 'foo' ) , 'baz' ) ;
3176
3180
strictEqual ( result . get ( 'bar' ) , undefined , "expected 'bar' field to be unset" ) ;
3181
+ strictEqual ( result . get ( 'qux' ) , undefined , "expected 'qux' field to be unset" ) ;
3177
3182
} )
3178
3183
. then ( function ( ) {
3179
3184
obj . _clearServerData ( ) ;
@@ -3186,6 +3191,7 @@ describe('Parse.Query testing', () => {
3186
3191
ok ( ! result . dirty ( ) , 'expected result not to be dirty' ) ;
3187
3192
strictEqual ( result . get ( 'foo' ) , 'baz' ) ;
3188
3193
strictEqual ( result . get ( 'bar' ) , 1 ) ;
3194
+ strictEqual ( result . get ( 'qux' ) , undefined , "expected 'qux' field to be unset" ) ;
3189
3195
} )
3190
3196
. then ( function ( ) {
3191
3197
obj . _clearServerData ( ) ;
@@ -3198,6 +3204,7 @@ describe('Parse.Query testing', () => {
3198
3204
ok ( ! result . dirty ( ) , 'expected result not to be dirty' ) ;
3199
3205
strictEqual ( result . get ( 'foo' ) , 'baz' ) ;
3200
3206
strictEqual ( result . get ( 'bar' ) , 1 ) ;
3207
+ strictEqual ( result . get ( 'qux' ) , undefined , "expected 'qux' field to be unset" ) ;
3201
3208
} )
3202
3209
. then (
3203
3210
function ( ) {
0 commit comments