-
Notifications
You must be signed in to change notification settings - Fork 108
[contract] Add 3 Tests to market_tests.rs (Part 1)Β #532
Copy link
Copy link
Open
Description
π Overview
Expand test coverage for the market module by adding 3 new tests (Part 1 of 2).
β Tasks
- Add 3 new test functions to
contract/tests/market_tests.rs - Follow existing test patterns and helper functions
- Verify all tests pass
π§ͺ New Tests (3 total)
Test 1: Create Market With Multiple Outcomes
#[test]
fn test_create_market_multiple_outcomes() {
// Create market with 3+ outcomes
// Verify all outcomes are stored
// Verify predictions can be made on any outcome
}Test 2: Market Expiration
#[test]
fn test_market_expiration() {
// Create market with end_time
// Advance time past end_time
// Try to make prediction
// Should fail with market expired error
}Test 3: Cancel Market
#[test]
fn test_cancel_market() {
// Create market with predictions
// Cancel market
// Verify market is marked cancelled
// Verify refunds are processed
}π Verification
- All 3 tests written
- All tests pass
- Tests follow existing patterns
- No clippy warnings
Reactions are currently unavailable