Fix test infrastructure for Rooms feature and improve testability

- Update Plant test fixtures to use roomID instead of deprecated location
- Add URLDataFetcher protocol to ImageCache for dependency injection
- Update ImageCacheTests to use protocol-based mock instead of URLSession subclass
- Add missing cancelReminders(for:plantID:) method to MockNotificationService
- Add Equatable conformance to ImageCacheError for test assertions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-01-23 14:55:50 -06:00
parent 7786a40ae0
commit 08ced7dbbb
5 changed files with 89 additions and 43 deletions

View File

@@ -254,7 +254,7 @@ final class UpdatePlantUseCaseTests: XCTestCase {
isFavorite: Bool = false,
notes: String? = nil,
customName: String? = nil,
location: String? = nil
roomID: UUID? = nil
) -> Plant {
Plant(
id: id,
@@ -263,9 +263,10 @@ final class UpdatePlantUseCaseTests: XCTestCase {
family: family,
genus: genus,
identificationSource: .onDeviceML,
notes: notes,
isFavorite: isFavorite,
customName: customName,
location: location
roomID: roomID
)
}