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

Commit

Permalink
Update misleading and incorrect tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGuilding committed Oct 2, 2023
1 parent fd24668 commit f19ebfb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
9 changes: 1 addition & 8 deletions account-integrations/safe/test/forge/SafeBlsPlugin.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,12 @@ contract SafeBlsPluginTest is TestHelper {
);
}

function test_validateNonce_ValidNonceSequence() public {
function test_validateNonce_ValidNonce() public view {
// Arrange
uint256 nonce = 0;
uint192 zeroKey = 0;

// Act & Assert
safeBlsPlugin.exposed_validateNonce(nonce);

vm.startPrank(address(safeBlsPlugin));
entryPoint.incrementNonce(zeroKey);
vm.stopPrank();

safeBlsPlugin.exposed_validateNonce(nonce++);
}

function test_validateNonce_ValidNonceLessThanMaxUint64() public view {
Expand Down
9 changes: 1 addition & 8 deletions account-integrations/safe/test/forge/SafeECDSAPlugin.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,12 @@ contract SafeECDSAPluginTest is TestHelper {
safeECDSAPlugin = new SafeECDSAPluginHarness(entryPointAddress);
}

function test_validateNonce_ValidNonceSequence() public {
function test_validateNonce_ValidNonce() public view {
// Arrange
uint256 nonce = 0;
uint192 zeroKey = 0;

// Act & Assert
safeECDSAPlugin.exposedValidateNonce(nonce);

vm.startPrank(address(safeECDSAPlugin));
entryPoint.incrementNonce(zeroKey);
vm.stopPrank();

safeECDSAPlugin.exposedValidateNonce(nonce++);
}

function test_validateNonce_ValidNonceLessThanMaxUint64() public view {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,12 @@ contract SafeWebAuthnPluginTest is TestHelper {
assertEq(validationData, expectedValidationData);
}

function test_validateNonce_ValidNonceSequence() public {
function test_validateNonce_ValidNonce() public view {
// Arrange
uint256 nonce = 0;
uint192 zeroKey = 0;

// Act & Assert
safeWebAuthnPlugin.exposed_validateNonce(nonce);

vm.startPrank(address(safeWebAuthnPlugin));
entryPoint.incrementNonce(zeroKey);
vm.stopPrank();

safeWebAuthnPlugin.exposed_validateNonce(nonce++);
}

function test_validateNonce_ValidNonceLessThanMaxUint64() public view {
Expand Down

0 comments on commit f19ebfb

Please sign in to comment.