@@ -293,6 +293,43 @@ describe("Group Functions", () => {
293293 } ) ;
294294 expect ( result . txHash ) . to . be . a ( "string" ) . and . not . empty ;
295295 } ) ;
296+
297+ it ( "should fail when trying to remove IPs from a non-existent group" , async ( ) => {
298+ const registerResult = await client . ipAsset . mintAndRegisterIpAssetWithPilTerms ( {
299+ spgNftContract,
300+ licenseTermsData,
301+ txOptions : { waitForTransaction : true } ,
302+ } ) ;
303+ const testIpId = registerResult . ipId ! ;
304+
305+ const nonExistentGroupId = zeroAddress ;
306+
307+ await expect (
308+ client . groupClient . removeIpsFromGroup ( {
309+ groupIpId : nonExistentGroupId ,
310+ ipIds : [ testIpId ] ,
311+ txOptions : { waitForTransaction : true } ,
312+ } )
313+ ) . to . be . rejectedWith ( "Failed to remove IPs from group" ) ;
314+ } ) ;
315+
316+ it ( "should fail when trying to remove non-existent IPs from a group" , async ( ) => {
317+ const groupResult = await client . groupClient . registerGroup ( {
318+ groupPool : groupPoolAddress ,
319+ txOptions : { waitForTransaction : true } ,
320+ } ) ;
321+ const testGroupId = groupResult . groupId ! ;
322+
323+ const nonExistentIpId = zeroAddress ;
324+
325+ await expect (
326+ client . groupClient . removeIpsFromGroup ( {
327+ groupIpId : testGroupId ,
328+ ipIds : [ nonExistentIpId ] ,
329+ txOptions : { waitForTransaction : true } ,
330+ } )
331+ ) . to . be . rejectedWith ( "Failed to remove IPs from group" ) ;
332+ } ) ;
296333 } ) ;
297334 } ) ;
298335
0 commit comments