Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
Test that addKeyperSet emits an event
Browse files Browse the repository at this point in the history
  • Loading branch information
schmir committed Jul 11, 2023
1 parent be94c77 commit f740b95
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/KeyperSetManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ contract KeyperSetManagerTest is Test {
keyperSetManager.addKeyperSet(1000, address(members1), broadcaster1);
}

event KeyperSetAdded(
uint64 activationSlot,
address keyperSetContract,
address keyBroadcaster
);

function testAddKeyperSetEmits() public {
vm.expectEmit(address(keyperSetManager));
emit KeyperSetAdded(1000, address(members0), broadcaster0);
keyperSetManager.addKeyperSet(1000, address(members0), broadcaster0);
}

function testGetKeyperSetIndexBySlotEmpty() public {
vm.expectRevert(NoActiveKeyperSet.selector);
keyperSetManager.getKeyperSetIndexBySlot(0);
Expand Down

0 comments on commit f740b95

Please sign in to comment.