feat: Add high-level integration testing framework
- Created trait abstractions for dependency injection with mockall support - Added comprehensive integration tests focusing on: * Database operations and persistence * Complete user workflow scenarios * Dialogue state transitions and validation * Multi-user scenarios and data integrity - Removed trivial unit tests, kept only meaningful business logic tests - Added UserRepository, ListingRepository, and BotMessenger traits - Integration tests verify end-to-end workflows with real database - Total: 30 focused tests (4 unit + 8 integration + 18 validation tests) Key integration test scenarios: - Complete listing creation workflow with database persistence - Listing update workflows with state validation - Multi-user independent operations - Error handling that preserves data integrity - Business rule enforcement (e.g., no timing changes on live listings) Framework ready for advanced mock-based testing when needed.
This commit is contained in:
@@ -26,6 +26,7 @@ thiserror = "2.0.16"
|
||||
teloxide-core = "0.13.0"
|
||||
num = "0.4.3"
|
||||
itertools = "0.14.0"
|
||||
async-trait = "0.1"
|
||||
|
||||
[dev-dependencies]
|
||||
rstest = "0.26.1"
|
||||
|
||||
Reference in New Issue
Block a user