Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
add feedbackgenerator
  • Loading branch information
mltbnz committed Oct 6, 2024
1 parent bf548b2 commit fbacade
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ final class AppFeatureTests: XCTestCase {
[.mock1]
}
$0.userDefaultsClient.setBool = { _, _ in }
$0.feedbackGenerator.prepare = {}
$0.feedbackGenerator.selectionChanged = {}
}
)
store.exhaustivity = .off
Expand Down Expand Up @@ -200,7 +202,8 @@ final class AppFeatureTests: XCTestCase {
$0.continuousClock = testClock
$0.nextRideService.nextRide = { _, _, _ in [] }
$0.userDefaultsClient.setString = { _, _ in }
$0.observationModeStore.setObservationModeState = { _ in }
$0.observationModeStore.setObservationModeState = { @Sendable _ in }
$0.feedbackGenerator.prepare = { @Sendable in }
}
)
store.exhaustivity = .off
Expand Down Expand Up @@ -398,6 +401,7 @@ final class AppFeatureTests: XCTestCase {
}
$0.continuousClock = TestClock()
$0.userDefaultsClient.setBool = { _, _ in }
$0.feedbackGenerator.selectionChanged = {}
}
)
store.exhaustivity = .off
Expand Down Expand Up @@ -514,6 +518,7 @@ final class AppFeatureTests: XCTestCase {
reducer: { AppFeature() },
withDependencies: {
$0.continuousClock = TestClock()
$0.feedbackGenerator.selectionChanged = {}
}
)
store.exhaustivity = .off
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ final class AppearanceSettingsCoreTests: XCTestCase {
let overriddenIconName = LockIsolated<String?>(nil)
let store = TestStore(
initialState: AppearanceSettings(),
reducer: { AppearanceSettingsFeature() }
reducer: { AppearanceSettingsFeature() },
withDependencies: {
$0.feedbackGenerator.selectionChanged = {}
}
)
store.dependencies.uiApplicationClient.setAlternateIconName = { newValue in
overriddenIconName.setValue(newValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ final class RideEventSettingsCoreTests: XCTestCase {
eventDistance: .close
)
),
reducer: { RideEventsSettingsFeature() }
reducer: { RideEventsSettingsFeature() },
withDependencies: {
$0.feedbackGenerator.selectionChanged = {}
}
)

await store.send(.set(\.$eventSearchRadius, .near)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ final class SettingsFeatureCoreTests: XCTestCase {
$0.fileClient.save = { @Sendable _, _ in
didSaveUserSettings.setValue(true)
}
$0.observationModeStore.setObservationModeState = { _ in }
$0.observationModeStore.setObservationModeState = { @Sendable _ in }
$0.feedbackGenerator.selectionChanged = {}
}
)

Expand Down

0 comments on commit fbacade

Please sign in to comment.