Skip to content

Commit

Permalink
add bolus for validation test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-bate committed Nov 8, 2023
1 parent e04413f commit d9ebea0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/types/settings/pump/pump_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,9 @@ var _ = Describe("Pump", func() {
datum.BloodGlucoseTargetSchedules = nil
datum.BloodGlucoseTargetPhysicalActivity = dataBloodGlucose.NewTarget()
datum.BloodGlucoseTargetPreprandial = dataBloodGlucose.NewTarget()
datum.Boluses = nil
datum.Bolus = pumpTest.NewRandomBolus()
datum.Bolus.Extended.Enabled = nil
invalidCarbohydrateRatioSchedule := pumpTest.NewCarbohydrateRatioStartArray()
(*invalidCarbohydrateRatioSchedule)[0].Start = nil
datum.CarbohydrateRatioSchedule = invalidCarbohydrateRatioSchedule
Expand Down Expand Up @@ -737,6 +740,7 @@ var _ = Describe("Pump", func() {
errorsTest.WithPointerSourceAndMeta(structureValidator.ErrorValueNotExists(), "/bgTargetPhysicalActivity/target", &dataTypes.Meta{Type: "invalidType"}),
errorsTest.WithPointerSourceAndMeta(structureValidator.ErrorValueNotExists(), "/bgTargetPreprandial/target", &dataTypes.Meta{Type: "invalidType"}),
errorsTest.WithPointerSourceAndMeta(structureValidator.ErrorValueNotExists(), "/bgTarget/0/start", &dataTypes.Meta{Type: "invalidType"}),
errorsTest.WithPointerSourceAndMeta(structureValidator.ErrorValueNotExists(), "/bolus/extended/enabled", &dataTypes.Meta{Type: "invalidType"}),
errorsTest.WithPointerSourceAndMeta(structureValidator.ErrorValueNotExists(), "/carbRatio/0/start", &dataTypes.Meta{Type: "invalidType"}),
errorsTest.WithPointerSourceAndMeta(structureValidator.ErrorValueNotExists(), "/display/bloodGlucose/units", &dataTypes.Meta{Type: "invalidType"}),
errorsTest.WithPointerSourceAndMeta(structureValidator.ErrorValueEmpty(), "/firmwareVersion", &dataTypes.Meta{Type: "invalidType"}),
Expand Down

0 comments on commit d9ebea0

Please sign in to comment.