@@ -34,6 +34,7 @@ contract GroupingIntegration is BaseIntegration {
34
34
_setUpTest ();
35
35
_test_GroupingIntegration_mintAndRegisterIpAndAttachLicenseAndAddToGroup ();
36
36
_test_GroupingIntegration_registerIpAndAttachLicenseAndAddToGroup ();
37
+ _test_GroupingIntegration_registerGroupAndAttachLicense ();
37
38
_test_GroupingIntegration_registerGroupAndAttachLicenseAndAddIps ();
38
39
_test_GroupingIntegration_multicall_mintAndRegisterIpAndAttachLicenseAndAddToGroup ();
39
40
_test_GroupingIntegration_multicall_registerIpAndAttachLicenseAndAddToGroup ();
@@ -147,6 +148,25 @@ contract GroupingIntegration is BaseIntegration {
147
148
assertEq (licenseTermsId, testLicenseTermsId);
148
149
}
149
150
151
+ function _test_GroupingIntegration_registerGroupAndAttachLicense ()
152
+ private
153
+ logTest ("test_GroupingIntegration_registerGroupAndAttachLicense " )
154
+ {
155
+ address newGroupId = groupingWorkflows.registerGroupAndAttachLicense ({
156
+ groupPool: groupRewardPool,
157
+ licenseTemplate: testLicenseTemplate,
158
+ licenseTermsId: testLicenseTermsId
159
+ });
160
+
161
+ // check the group IPA is registered
162
+ assertTrue (IGroupIPAssetRegistry (ipAssetRegistryAddr).isRegisteredGroup (newGroupId));
163
+
164
+ // check the license terms is correctly attached to the group IPA
165
+ (address licenseTemplate , uint256 licenseTermsId ) = licenseRegistry.getAttachedLicenseTerms (newGroupId, 0 );
166
+ assertEq (licenseTemplate, testLicenseTemplate);
167
+ assertEq (licenseTermsId, testLicenseTermsId);
168
+ }
169
+
150
170
function _test_GroupingIntegration_registerGroupAndAttachLicenseAndAddIps ()
151
171
private
152
172
logTest ("test_GroupingIntegration_registerGroupAndAttachLicenseAndAddIps " )
0 commit comments