Commit Graph

1 Commits

Author SHA1 Message Date
Cal Corum
15d0513740 CLAUDE: Add comprehensive tests for injury modal playoff week validation
Added 16 tests covering all aspects of injury modal validation including
regular season and playoff-specific game limits.

Test Coverage:
- BatterInjuryModal week validation (5 tests)
  * Regular season weeks (1-18) acceptance
  * Playoff weeks (19-21) acceptance
  * Invalid weeks rejection (0, 22+)

- BatterInjuryModal game validation (6 tests)
  * Regular season: games 1-4 valid, game 5+ rejected
  * Playoff round 1 (week 19): games 1-5 valid, game 6+ rejected
  * Playoff round 2 (week 20): games 1-7 valid
  * Playoff round 3 (week 21): games 1-7 valid

- PitcherRestModal validation (4 tests)
  * Same week validation as BatterInjuryModal
  * Same game validation as BatterInjuryModal

- Config-driven validation (1 test)
  * Verifies custom config values are respected

All tests use proper mocking patterns:
- PropertyMock for TextInput.value (read-only property)
- Correct patch paths for config and services
- Complete model data for Pydantic validation

Test Results: 16/16 passing 

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 01:00:57 -05:00