Skip to content

Commit

Permalink
test: update asset recovery role test to use specific role
Browse files Browse the repository at this point in the history
  • Loading branch information
DiRaiks committed Mar 2, 2025
1 parent c1f271d commit 6f37fc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/0.8.25/vaults/dashboard/dashboard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1641,13 +1641,14 @@ describe("Dashboard.sol", () => {
await vaultOwner.sendTransaction({ to: dashboardAddress, value: amount });
await wethContract.transfer(dashboardAddress, amount);
await erc721.mint(dashboardAddress, 0);
await dashboard.grantRole(await dashboard.ASSET_RECOVERY_ROLE(), vaultOwner);

expect(await ethers.provider.getBalance(dashboardAddress)).to.equal(amount);
expect(await wethContract.balanceOf(dashboardAddress)).to.equal(amount);
expect(await erc721.ownerOf(0)).to.equal(dashboardAddress);
});

it("allows only admin to recover", async () => {
it("allows only ASSET_RECOVERY_ROLE to recover", async () => {
await expect(dashboard.connect(stranger).recoverERC20(ZeroAddress, vaultOwner, 1n)).to.be.revertedWithCustomError(
dashboard,
"AccessControlUnauthorizedAccount",
Expand Down

0 comments on commit 6f37fc5

Please sign in to comment.