-
Notifications
You must be signed in to change notification settings - Fork 52
feat: add comprehensive user balance management tests #212
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
base: master
Are you sure you want to change the base?
feat: add comprehensive user balance management tests #212
Conversation
|
@Gbangbolaoluwagbemiga Please resolve the conflicts |
|
@greatest0fallt1me, please review and merge, will appreciate picking up more issues, love the codebase and isea behind this |
19af03b to
0802906
Compare
|
@Gbangbolaoluwagbemiga Please resolve the conflicts |
|
@greatest0fallt1me conflicts resolved |
|
@greatest0fallt1me cli build issues has been fixed too, please leave a good review. Ready to take on more issues. |
|
@Gbangbolaoluwagbemiga, please check if the pipeline is failing. |
c903882 to
d51a73b
Compare
|
@Gbangbolaoluwagbemiga Please resolve the conflicts |
- Resolved conflicts in admin.rs, lib.rs, markets.rs, test.rs - Added global warning suppressions to fix compilation errors - Fixed duplicate test definitions - Ensured admin permissions logic logic is correct
This PR implements comprehensive test cases for the User Balance Management system, targeting 95%+ coverage for deposits, withdrawals, and claims. It also updates the voting logic to production standards by enabling live token transfers.
Key Changes
New Tests: Added 24 test cases in test.rs covering:
Voting deposits and balance tracking.
Winnings claims and fee calculations.
Security validation (preventing double claims, unauthorized access).
Edge cases (zero balance, minimum stakes).
Bug Fix: Fixed test_claim_losing_outcome to correctly verify that losing claims are marked as processed.
Screenshot
Setup
Run tests with: cargo test --lib
Issue Linked
Closes #207