-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/add more test cases for body parsing #70
Feat/add more test cases for body parsing #70
Conversation
@@ -73,6 +73,126 @@ contract EmailAccountRecoveryTest_handleRecovery is StructHelper { | |||
); | |||
} | |||
|
|||
function testExpectRevertHandleRecoveryInvalidRecoveredAccount() public { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between testExpectRevertHandleRecoveryInvalidRecoveredAccount
and testExpectRevertHandleRecoveryInvalidAccountInEmail
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohnGuilding The first test is more focused on the initial invalid account scenario without any prior state changes.
The second test ensures that even after a guardian is accepted, the function still correctly handles an invalid account scenario.
); | ||
} | ||
|
||
// function testRequestGuardianNotOwner() public { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented out code
// Upgrade to new implementation through proxy | ||
emailAuthProxy.upgradeToAndCall( | ||
address(newImplementation), | ||
new bytes(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we encode a call here and assert something about the new state as well as the old state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JohnGuilding emailAuthProxy has already initialized once, should I create a new implementation for testing only?
Also @wshino we don't have tests for (correct me if I'm wrong):
Could we add these as well? |
Add test cases for:
Please let me know if there are any test cases which should be needed.