@@ -151,6 +151,7 @@ describe('Accept share action execute tests', () => {
151151 permissions : Permission . READ ,
152152 attributes : {
153153 share_type : ShareType . User ,
154+ 'share-id' : '1' ,
154155 } ,
155156 root : '/files/admin' ,
156157 } )
@@ -164,7 +165,7 @@ describe('Accept share action execute tests', () => {
164165
165166 expect ( exec ) . toBe ( true )
166167 expect ( axios . post ) . toBeCalledTimes ( 1 )
167- expect ( axios . post ) . toBeCalledWith ( 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/123 ' )
168+ expect ( axios . post ) . toBeCalledWith ( 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/1 ' )
168169
169170 expect ( eventBus . emit ) . toBeCalledTimes ( 1 )
170171 expect ( eventBus . emit ) . toBeCalledWith ( 'files:node:deleted' , file )
@@ -183,6 +184,7 @@ describe('Accept share action execute tests', () => {
183184 attributes : {
184185 remote : 3 ,
185186 share_type : ShareType . User ,
187+ 'share-id' : '1' ,
186188 } ,
187189 root : '/files/admin' ,
188190 } )
@@ -196,7 +198,7 @@ describe('Accept share action execute tests', () => {
196198
197199 expect ( exec ) . toBe ( true )
198200 expect ( axios . post ) . toBeCalledTimes ( 1 )
199- expect ( axios . post ) . toBeCalledWith ( 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/123 ' )
201+ expect ( axios . post ) . toBeCalledWith ( 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/1 ' )
200202
201203 expect ( eventBus . emit ) . toBeCalledTimes ( 1 )
202204 expect ( eventBus . emit ) . toBeCalledWith ( 'files:node:deleted' , file )
@@ -214,6 +216,7 @@ describe('Accept share action execute tests', () => {
214216 permissions : Permission . READ ,
215217 attributes : {
216218 share_type : ShareType . User ,
219+ 'share-id' : '1' ,
217220 } ,
218221 root : '/files/admin' ,
219222 } )
@@ -226,6 +229,7 @@ describe('Accept share action execute tests', () => {
226229 permissions : Permission . READ ,
227230 attributes : {
228231 share_type : ShareType . User ,
232+ 'share-id' : '2' ,
229233 } ,
230234 root : '/files/admin' ,
231235 } )
@@ -239,8 +243,8 @@ describe('Accept share action execute tests', () => {
239243
240244 expect ( exec ) . toStrictEqual ( [ true , true ] )
241245 expect ( axios . post ) . toBeCalledTimes ( 2 )
242- expect ( axios . post ) . toHaveBeenNthCalledWith ( 1 , 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/123 ' )
243- expect ( axios . post ) . toHaveBeenNthCalledWith ( 2 , 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/456 ' )
246+ expect ( axios . post ) . toHaveBeenNthCalledWith ( 1 , 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/1 ' )
247+ expect ( axios . post ) . toHaveBeenNthCalledWith ( 2 , 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/2 ' )
244248
245249 expect ( eventBus . emit ) . toBeCalledTimes ( 2 )
246250 expect ( eventBus . emit ) . toHaveBeenNthCalledWith ( 1 , 'files:node:deleted' , file1 )
@@ -260,6 +264,7 @@ describe('Accept share action execute tests', () => {
260264 permissions : Permission . READ ,
261265 attributes : {
262266 share_type : ShareType . User ,
267+ 'share-id' : '1' ,
263268 } ,
264269 root : '/files/admin' ,
265270 } )
@@ -273,7 +278,7 @@ describe('Accept share action execute tests', () => {
273278
274279 expect ( exec ) . toBe ( false )
275280 expect ( axios . post ) . toBeCalledTimes ( 1 )
276- expect ( axios . post ) . toBeCalledWith ( 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/123 ' )
281+ expect ( axios . post ) . toBeCalledWith ( 'http://nextcloud.local/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/1 ' )
277282
278283 expect ( eventBus . emit ) . toBeCalledTimes ( 0 )
279284 } )
0 commit comments