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:
@@ -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
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user