Skip to content

Commit

Permalink
test: fix events and re-enable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRBerg committed Jun 22, 2023
1 parent 37dc8be commit f4ac54b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
3 changes: 1 addition & 2 deletions test/registry/install-plugin/installPlugin.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ contract InstallPlugin_Test is Registry_Test {
}
}

// TODO: re-enable this test once this bug is fixed https://github.com/foundry-rs/foundry/pull/4920
function test_InstallPlugin_Event() private whenCallerHasProxy whenPluginListNotEmpty whenPluginNotInstalled {
function test_InstallPlugin_Event() external whenCallerHasProxy whenPluginListNotEmpty whenPluginNotInstalled {
vm.expectEmit({ emitter: address(registry) });
emit InstallPlugin({ owner: users.alice, proxy: proxy, plugin: plugins.dummy });
registry.installPlugin(plugins.dummy);
Expand Down
6 changes: 2 additions & 4 deletions test/registry/set-permission/setPermission.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ contract SetPermission_Test is Registry_Test {
assertTrue(permission, "permission mismatch");
}

// TODO: re-enable this test once this bug is fixed https://github.com/foundry-rs/foundry/pull/4920
function test_SetPermission_ResetPermission_Event() private whenCallerHasProxy whenPermissionSet {
function test_SetPermission_ResetPermission_Event() external whenCallerHasProxy whenPermissionSet {
vm.expectEmit({ emitter: address(registry) });
emit SetPermission({
owner: users.alice,
Expand All @@ -55,8 +54,7 @@ contract SetPermission_Test is Registry_Test {
registry.setPermission({ envoy: users.envoy, target: address(targets.dummy), permission: false });
}

// TODO: re-enable this test once this bug is fixed https://github.com/foundry-rs/foundry/pull/4920
function test_SetPermission_UnsetPermission_Event() private whenCallerHasProxy whenPermissionSet {
function test_SetPermission_UnsetPermission_Event() external whenCallerHasProxy whenPermissionSet {
vm.expectEmit({ emitter: address(registry) });
emit SetPermission({
owner: users.alice,
Expand Down
3 changes: 1 addition & 2 deletions test/registry/uninstall-plugin/uninstallPlugin.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ contract UninstallPlugin_Test is Registry_Test {
}
}

// TODO: re-enable this test once this bug is fixed https://github.com/foundry-rs/foundry/pull/4920
function test_UninstallPlugin_Event() private whenCallerHasProxy whenPluginHasMethods whenPluginInstalled {
function test_UninstallPlugin_Event() external whenCallerHasProxy whenPluginHasMethods whenPluginInstalled {
vm.expectEmit({ emitter: address(registry) });
emit UninstallPlugin({ owner: users.alice, proxy: proxy, plugin: plugins.dummy });
registry.uninstallPlugin(plugins.dummy);
Expand Down
8 changes: 5 additions & 3 deletions test/utils/Events.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ abstract contract Events {
IPRBProxy proxy
);

event InstallPlugin(address owner, IPRBProxy proxy, IPRBProxyPlugin indexed plugin);
event InstallPlugin(address indexed owner, IPRBProxy indexed proxy, IPRBProxyPlugin indexed plugin);

event SetPermission(address owner, IPRBProxy proxy, address indexed envoy, address indexed target, bool permission);
event SetPermission(
address indexed owner, IPRBProxy indexed proxy, address indexed envoy, address target, bool permission
);

event UninstallPlugin(address owner, IPRBProxy proxy, IPRBProxyPlugin indexed plugin);
event UninstallPlugin(address indexed owner, IPRBProxy indexed proxy, IPRBProxyPlugin indexed plugin);
}

0 comments on commit f4ac54b

Please sign in to comment.