@@ -141,7 +141,8 @@ describe('searchObjects', () => {
141141 expect ( ObjectModel . query ) . toHaveBeenCalledTimes ( 1 ) ;
142142 expect ( ObjectModel . query ) . toHaveBeenCalledWith ( expect . anything ( ) ) ;
143143 expect ( ObjectModel . allowGraph ) . toHaveBeenCalledTimes ( 1 ) ;
144- expect ( ObjectModel . allowGraph ) . toHaveBeenCalledWith ( '[bucketPermission, objectPermission, version]' ) ;
144+ expect ( ObjectModel . allowGraph )
145+ . toHaveBeenCalledWith ( '[bucketPermission, objectPermission, objectIdpPermission, bucketIdpPermission, version]' ) ;
145146 expect ( ObjectModel . groupBy ) . toHaveBeenCalledTimes ( 1 ) ;
146147 expect ( ObjectModel . modify ) . toHaveBeenCalledTimes ( 11 ) ;
147148 expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 1 , 'filterIds' , params . id ) ;
@@ -156,7 +157,9 @@ describe('searchObjects', () => {
156157 metadata : params . metadata ,
157158 tag : params . tag
158159 } ) ;
159- expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 9 , 'hasPermission' , params . userId , 'READ' ) ;
160+ expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 9 , 'hasPermission' , {
161+ idp : undefined , permCode : 'READ' , userId : params . userId
162+ } ) ;
160163 expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 10 , 'pagination' , params . page , params . limit ) ;
161164 expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 11 , 'sortOrder' , params . sort , params . order ) ;
162165 expect ( objectModelTrx . commit ) . toHaveBeenCalledTimes ( 1 ) ;
@@ -187,7 +190,8 @@ describe('searchObjects', () => {
187190 expect ( ObjectModel . query ) . toHaveBeenCalledTimes ( 1 ) ;
188191 expect ( ObjectModel . query ) . toHaveBeenCalledWith ( expect . anything ( ) ) ;
189192 expect ( ObjectModel . allowGraph ) . toHaveBeenCalledTimes ( 1 ) ;
190- expect ( ObjectModel . allowGraph ) . toHaveBeenCalledWith ( '[bucketPermission, objectPermission, version]' ) ;
193+ expect ( ObjectModel . allowGraph )
194+ . toHaveBeenCalledWith ( '[bucketPermission, objectPermission, objectIdpPermission, bucketIdpPermission, version]' ) ;
191195 expect ( ObjectModel . groupBy ) . toHaveBeenCalledTimes ( 1 ) ;
192196 expect ( ObjectModel . modify ) . toHaveBeenCalledTimes ( 11 ) ;
193197 expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 1 , 'filterIds' , params . id ) ;
@@ -203,7 +207,9 @@ describe('searchObjects', () => {
203207 metadata : params . metadata ,
204208 tag : params . tag
205209 } ) ;
206- expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 9 , 'hasPermission' , params . userId , 'READ' ) ;
210+ expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 9 , 'hasPermission' , {
211+ idp : undefined , permCode : 'READ' , userId : params . userId
212+ } ) ;
207213 expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 10 , 'pagination' , params . page , params . limit ) ;
208214 expect ( ObjectModel . modify ) . toHaveBeenNthCalledWith ( 11 , 'sortOrder' , params . sort , params . order ) ;
209215 expect ( objectModelTrx . commit ) . toHaveBeenCalledTimes ( 1 ) ;
0 commit comments