-
Notifications
You must be signed in to change notification settings - Fork 109
[contract] Add 3 Tests to oracle_tests.rsΒ #534
Copy link
Copy link
Open
Description
π Overview
Expand test coverage for the oracle module by adding 3 new tests.
β Tasks
- Add 3 new test functions to
contract/tests/oracle_tests.rs - Follow existing test patterns and helper functions
- Verify all tests pass
π§ͺ New Tests (3 total)
Test 1: Resolve Market With Invalid Outcome
#[test]
fn test_resolve_market_invalid_outcome() {
// Create market with outcomes ["yes", "no"]
// Try to resolve with outcome "maybe"
// Should fail with invalid outcome error
}Test 2: Resolve Already Resolved Market
#[test]
fn test_resolve_already_resolved_market() {
// Create and resolve market
// Try to resolve again
// Should fail with already resolved error
}Test 3: Resolve Market Before Resolution Time
#[test]
fn test_resolve_market_too_early() {
// Create market with resolution_time in future
// Try to resolve before resolution_time
// Should fail with too early error
}π Verification
- All 3 tests written
- All tests pass
- Tests follow existing patterns
- No clippy warnings
Reactions are currently unavailable