Skip to content

Commit

Permalink
dao: improve a test
Browse files Browse the repository at this point in the history
  • Loading branch information
eladmallel committed Feb 22, 2024
1 parent 4474425 commit 2006247
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 2006247

Please sign in to comment.