@@ -239,7 +239,6 @@ describe('DatabaseController', function () {
239
239
it ( 'should not return a $or operation if the query involves one of the two fields also used as array/pointer permissions' , done => {
240
240
const clp = buildCLP ( [ 'users' , 'user' ] ) ;
241
241
const query = { a : 'b' , user : createUserPointer ( USER_ID ) } ;
242
-
243
242
schemaController . testPermissionsForClassName
244
243
. withArgs ( CLASS_NAME , ACL_GROUP , OPERATION )
245
244
. and . returnValue ( false ) ;
@@ -250,24 +249,20 @@ describe('DatabaseController', function () {
250
249
schemaController . getExpectedType
251
250
. withArgs ( CLASS_NAME , 'users' )
252
251
. and . returnValue ( { type : 'Array' } ) ;
253
-
254
252
const output = databaseController . addPointerPermissions (
255
253
schemaController ,
256
254
CLASS_NAME ,
257
255
OPERATION ,
258
256
query ,
259
257
ACL_GROUP
260
258
) ;
261
-
262
259
expect ( output ) . toEqual ( { ...query , user : createUserPointer ( USER_ID ) } ) ;
263
-
264
260
done ( ) ;
265
261
} ) ;
266
262
267
263
it ( 'should not return a $or operation if the query involves one of the fields also used as array/pointer permissions' , done => {
268
264
const clp = buildCLP ( [ 'user' , 'users' , 'userObject' ] ) ;
269
265
const query = { a : 'b' , user : createUserPointer ( USER_ID ) } ;
270
-
271
266
schemaController . testPermissionsForClassName
272
267
. withArgs ( CLASS_NAME , ACL_GROUP , OPERATION )
273
268
. and . returnValue ( false ) ;
@@ -281,17 +276,14 @@ describe('DatabaseController', function () {
281
276
schemaController . getExpectedType
282
277
. withArgs ( CLASS_NAME , 'userObject' )
283
278
. and . returnValue ( { type : 'Object' } ) ;
284
-
285
279
const output = databaseController . addPointerPermissions (
286
280
schemaController ,
287
281
CLASS_NAME ,
288
282
OPERATION ,
289
283
query ,
290
284
ACL_GROUP
291
285
) ;
292
-
293
286
expect ( output ) . toEqual ( { ...query , user : createUserPointer ( USER_ID ) } ) ;
294
-
295
287
done ( ) ;
296
288
} ) ;
297
289
0 commit comments