Skip to content

Commit af7c6de

Browse files
committed
Trigger .preferences changed signal when changing settings in Bolus view tests
1 parent e2a57ab commit af7c6de

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

LoopTests/ViewModels/BolusEntryViewModelTests.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,14 @@ fileprivate class MockBolusEntryViewModelDelegate: BolusEntryViewModelDelegate {
949949
glucoseTargetRangeSchedule: BolusEntryViewModelTests.exampleGlucoseRangeSchedule,
950950
maximumBasalRatePerHour: 3.0,
951951
maximumBolus: 10.0,
952-
suspendThreshold: GlucoseThreshold(unit: .internationalUnit(), value: 75))
952+
suspendThreshold: GlucoseThreshold(unit: .internationalUnit(), value: 75)) {
953+
didSet {
954+
NotificationCenter.default.post(name: .LoopDataUpdated, object: nil, userInfo: [
955+
LoopDataManager.LoopUpdateContextKey: LoopDataManager.LoopUpdateContext.preferences.rawValue
956+
])
957+
}
958+
}
959+
953960
}
954961

955962
fileprivate struct MockInsulinModel: InsulinModel {

0 commit comments

Comments
 (0)