Skip to content

Commit

Permalink
fixed failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin committed Nov 29, 2024
1 parent 4876c09 commit 018a045
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion test/CommitteeGovernance.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import "forge-std/Test.sol";
import "../src/CommitteeGovernance.sol";
import "../src/Governance.sol";
import "../src/PlatformToken.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract CommitteeGovernanceTest is Test {
CommitteeGovernance public committeeGov;
Expand Down Expand Up @@ -85,7 +86,12 @@ contract CommitteeGovernanceTest is Test {
function testOnlyAdminCanCreateCommittee() public {
vm.startPrank(alice);
vm.expectRevert(
hex"e2517d3f000000000000000000000000000000000000000000000000000000000000000001733701979d7191ced62c79d6dde6252b95fb4941eed0547f745e7c3a1bab83b3"
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(alice),
" is missing role ",
Strings.toHexString(uint256(COMMITTEE_ADMIN_ROLE), 32)
)
);
committeeGov.createCommittee("Test Committee", "Test Description", 500);
vm.stopPrank();
Expand Down
8 changes: 7 additions & 1 deletion test/ProposalTemplates.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity ^0.8.13;

import "forge-std/Test.sol";
import "../src/ProposalTemplates.sol";
import "openzeppelin-contracts/contracts/access/AccessControl.sol";

contract ProposalTemplatesTest is Test {
ProposalTemplates public templates;
Expand Down Expand Up @@ -123,7 +124,12 @@ contract ProposalTemplatesTest is Test {

vm.startPrank(alice);
vm.expectRevert(
hex"e2517d3f000000000000000000000000000000000000000000000000000000000000000160a76a0b70eaebb9f781b27a8b41cd86da9ad7659595aff5cd32f3d522fa85ba"
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(alice),
" is missing role ",
Strings.toHexString(uint256(TEMPLATE_ADMIN_ROLE), 32)
)
);
templates.createTemplate(
"Test Template", "A test template", mockContract, TEST_FUNCTION, paramNames, paramTypes
Expand Down

0 comments on commit 018a045

Please sign in to comment.