@@ -1309,6 +1309,61 @@ contract GroupingModuleTest is BaseTest, ERC721Holder {
1309
1309
vm.stopPrank ();
1310
1310
}
1311
1311
1312
+ function test_GroupingModule_mintLicenseToken_revert_groupIpHasNoLicenseTerms () public {
1313
+ uint256 attachedTermsId = pilTemplate.registerLicenseTerms (
1314
+ PILFlavors.commercialRemix ({
1315
+ mintingFee: 0 ,
1316
+ commercialRevShare: 10 ,
1317
+ currencyToken: address (erc20),
1318
+ royaltyPolicy: address (royaltyPolicyLRP)
1319
+ })
1320
+ );
1321
+
1322
+ Licensing.LicensingConfig memory licensingConfig = Licensing.LicensingConfig ({
1323
+ isSet: true ,
1324
+ mintingFee: 0 ,
1325
+ licensingHook: address (0 ),
1326
+ hookData: "" ,
1327
+ commercialRevShare: 0 ,
1328
+ disabled: false ,
1329
+ expectMinimumGroupRewardShare: 0 ,
1330
+ expectGroupRewardPool: address (evenSplitGroupPool)
1331
+ });
1332
+
1333
+ vm.startPrank (ipOwner1);
1334
+ licensingModule.attachLicenseTerms (ipId1, address (pilTemplate), attachedTermsId);
1335
+ licensingModule.setLicensingConfig (ipId1, address (pilTemplate), attachedTermsId, licensingConfig);
1336
+ vm.stopPrank ();
1337
+
1338
+ vm.startPrank (alice);
1339
+ address groupId = groupingModule.registerGroup (address (rewardPool));
1340
+ licensingModule.attachLicenseTerms (groupId, address (pilTemplate), attachedTermsId);
1341
+ address [] memory ipIds = new address [](1 );
1342
+ ipIds[0 ] = ipId1;
1343
+ groupingModule.addIp (groupId, ipIds, 100e6 );
1344
+ vm.stopPrank ();
1345
+
1346
+ vm.startPrank (alice);
1347
+ uint256 notAttachedTermsId = pilTemplate.registerLicenseTerms (
1348
+ PILFlavors.commercialRemix ({
1349
+ mintingFee: 0 ,
1350
+ commercialRevShare: 50 ,
1351
+ currencyToken: address (erc20),
1352
+ royaltyPolicy: address (royaltyPolicyLRP)
1353
+ })
1354
+ );
1355
+ vm.expectRevert (
1356
+ abi.encodeWithSelector (
1357
+ Errors.LicenseRegistry__LicensorIpHasNoLicenseTerms.selector ,
1358
+ groupId,
1359
+ address (pilTemplate),
1360
+ notAttachedTermsId
1361
+ )
1362
+ );
1363
+ licensingModule.mintLicenseTokens (groupId, address (pilTemplate), notAttachedTermsId, 1 , ipOwner1, "" , 0 , 0 );
1364
+ vm.stopPrank ();
1365
+ }
1366
+
1312
1367
function test_GroupingModule_registerDerivative_revert_registerGroupAsChild () public {
1313
1368
uint256 termsId = pilTemplate.registerLicenseTerms (
1314
1369
PILFlavors.commercialRemix ({
0 commit comments