Skip to content

Commit 01bfe98

Browse files
committed
Pin lifecycle rejection tests to the compliance gate selector
1 parent 85e2154 commit 01bfe98

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/integration/EmergencyPause.t.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ contract EmergencyPauseTest is IntegrationBase {
4242

4343
ExecutionRequest memory req = buildBuyRequest(alice, 50 ether, 50 ether);
4444
vm.prank(alice);
45-
vm.expectRevert(); // ComplianceRejected(reasonCode) — POLICY/SUSPENDED
45+
vm.expectPartialRevert(Errors.ComplianceRejected.selector); // POLICY/SUSPENDED
4646
router.execute(req);
4747

4848
assertEq(rwaToken.balanceOf(alice), 0, "no RWA while policy suspended");
@@ -59,7 +59,7 @@ contract EmergencyPauseTest is IntegrationBase {
5959

6060
ExecutionRequest memory req = buildBuyRequest(alice, 50 ether, 50 ether);
6161
vm.prank(alice);
62-
vm.expectRevert(); // ComplianceRejected(reasonCode) — POLICY/PROPOSED
62+
vm.expectPartialRevert(Errors.ComplianceRejected.selector); // POLICY/PROPOSED
6363
router.execute(req);
6464

6565
assertEq(rwaToken.balanceOf(alice), 0, "no RWA while policy only PROPOSED");
@@ -73,7 +73,7 @@ contract EmergencyPauseTest is IntegrationBase {
7373

7474
ExecutionRequest memory req = buildBuyRequest(alice, 50 ether, 50 ether);
7575
vm.prank(alice);
76-
vm.expectRevert(); // ComplianceRejected(reasonCode) — POLICY/RETIRED
76+
vm.expectPartialRevert(Errors.ComplianceRejected.selector); // POLICY/RETIRED
7777
router.execute(req);
7878

7979
assertEq(rwaToken.balanceOf(alice), 0, "no RWA while policy RETIRED");
@@ -87,7 +87,7 @@ contract EmergencyPauseTest is IntegrationBase {
8787
policyReg.suspendManifest(address(rwaToken), bytes32("EMERGENCY"));
8888
ExecutionRequest memory blocked = buildBuyRequest(alice, 50 ether, 50 ether);
8989
vm.prank(alice);
90-
vm.expectRevert(); // ComplianceRejected — POLICY/SUSPENDED
90+
vm.expectPartialRevert(Errors.ComplianceRejected.selector); // POLICY/SUSPENDED
9191
router.execute(blocked);
9292
assertEq(rwaToken.balanceOf(alice), 0, "blocked while suspended");
9393

0 commit comments

Comments
 (0)