π Overview
Expand test coverage for the invite module by adding 3 new tests (Part 1 of 2).
β
Tasks
π§ͺ New Tests (3 total)
Test 1: Invite Code Expiration
#[test]
fn test_invite_code_expiration() {
// Generate invite code with expiration
// Advance time past expiration
// Try to use code
// Should fail with expired error
}
Test 2: Invite Code Usage Limit
#[test]
fn test_invite_code_usage_limit_reached() {
// Generate code with max_uses = 2
// Use code twice successfully
// Try to use third time
// Should fail with limit reached error
}
Test 3: Multiple Invite Codes Per Market
#[test]
fn test_multiple_invite_codes_per_market() {
// Generate multiple codes for same market
// Verify each works independently
// Verify usage tracking is separate
}
π Verification
π Overview
Expand test coverage for the invite module by adding 3 new tests (Part 1 of 2).
β Tasks
contract/tests/invite_tests.rsπ§ͺ New Tests (3 total)
Test 1: Invite Code Expiration
Test 2: Invite Code Usage Limit
Test 3: Multiple Invite Codes Per Market
π Verification