@@ -3,9 +3,9 @@ pragma solidity >=0.8.13;
33
44// solhint-disable no-console, private-vars-leading-underscore, state-visibility, func-name-mixedcase, namechain/ordering, one-contract-per-file
55
6- import {Test} from "forge-std/Test.sol " ;
7- import {Vm} from "forge-std/Vm.sol " ;
6+ import {Vm, Test} from "forge-std/Test.sol " ;
87
8+ import {NameCoder} from "@ens/contracts/utils/NameCoder.sol " ;
99import {IERC1155 } from "@openzeppelin/contracts/token/ERC1155/IERC1155.sol " ;
1010import {ERC1155Holder } from "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol " ;
1111
@@ -367,6 +367,17 @@ contract PermissionedRegistryTest is Test, ERC1155Holder {
367367 );
368368 }
369369
370+ function test_Revert_register_tooShort () external {
371+ vm.expectRevert (abi.encodeWithSelector (NameCoder.LabelIsEmpty.selector ));
372+ registry.register ("" , user1, registry, address (0 ), DEFAULT_ROLE_BITMAP, _after (86400 ));
373+ }
374+
375+ function test_Revert_register_tooLong () external {
376+ string memory label = new string (256 );
377+ vm.expectRevert (abi.encodeWithSelector (NameCoder.LabelIsTooLong.selector , label));
378+ registry.register (label, user1, registry, address (0 ), DEFAULT_ROLE_BITMAP, _after (86400 ));
379+ }
380+
370381 function test_Revert_cannot_mint_duplicates () public {
371382 registry.register (
372383 "test2 " ,
@@ -1298,8 +1309,7 @@ contract PermissionedRegistryTest is Test, ERC1155Holder {
12981309 );
12991310
13001311 // Query for multiple roles where only SET_RESOLVER has assignees
1301- uint256 queryBitmap = RegistryRolesLib.ROLE_SET_RESOLVER |
1302- RegistryRolesLib.ROLE_RENEW;
1312+ uint256 queryBitmap = RegistryRolesLib.ROLE_SET_RESOLVER | RegistryRolesLib.ROLE_RENEW;
13031313 (uint256 counts , ) = registry.getAssigneeCount (tokenId, queryBitmap);
13041314
13051315 // Only SET_RESOLVER should have 1 assignee
0 commit comments