mirror of
https://github.com/cliffe/BreakEscape.git
synced 2026-02-21 19:28:03 +00:00
Created extensive test suite covering all lock types and unlock scenarios: DOOR TESTS: - PIN validation (server-side) - correct/incorrect attempts - Password validation (server-side) - correct/incorrect, case sensitivity - Key unlocks (client-validated, server-trusted) - Unlocked doors (method='unlocked') CONTAINER TESTS: - PIN validation (server-side) - correct/incorrect attempts - Password validation (server-side) - correct/incorrect, empty attempts - Key unlocks (client-validated) - Lockpick unlocks (client-validated) - Biometric unlocks (client-validated) - Bluetooth unlocks (client-validated) - RFID unlocks (client-validated) - Unlocked containers (method='unlocked') ERROR CASES: - Non-existent doors/objects - Invalid methods - Multiple unlocks and idempotency SECURITY TESTS: - Verify 'requires' field is filtered from responses - Verify contents are filtered recursively INTEGRATION TESTS: - Multiple sequential unlocks - State persistence - Idempotent operations Also fixed: Game model generate_scenario_data now uses ||= to allow test scenarios to override mission data. Test Results: 24 tests, 83 assertions, 0 failures