From 20062472df7c702ed7487743b4e8f52142ca270d Mon Sep 17 00:00:00 2001 From: eladmallel Date: Thu, 22 Feb 2024 15:49:41 -0500 Subject: [PATCH] dao: improve a test --- .../test/foundry/NounsDAOLogic/NounsDAOAdmin.t.sol | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/nouns-contracts/test/foundry/NounsDAOLogic/NounsDAOAdmin.t.sol b/packages/nouns-contracts/test/foundry/NounsDAOLogic/NounsDAOAdmin.t.sol index 808160ba8..1e8a21d0e 100644 --- a/packages/nouns-contracts/test/foundry/NounsDAOLogic/NounsDAOAdmin.t.sol +++ b/packages/nouns-contracts/test/foundry/NounsDAOLogic/NounsDAOAdmin.t.sol @@ -126,11 +126,20 @@ contract NounsDAOLogicAdminTest is NounsDAOLogicBaseTest { function test_changingAdmin_worksForAdmin() public { address newAdmin = makeAddr('new admin'); + address oldAdmin = address(dao.admin()); assertNotEq(newAdmin, address(dao.admin())); + vm.expectEmit(true, true, true, true); + emit NounsDAOAdmin.NewPendingAdmin(address(0), newAdmin); + vm.prank(address(dao.admin())); dao._setPendingAdmin(newAdmin); + vm.expectEmit(true, true, true, true); + emit NounsDAOAdmin.NewAdmin(oldAdmin, newAdmin); + vm.expectEmit(true, true, true, true); + emit NounsDAOAdmin.NewPendingAdmin(newAdmin, address(0)); + vm.prank(newAdmin); dao._acceptAdmin();