Commit b133b0b

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-03-29 09:35:25
add test to bp repo
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent 87bc19b
Changed files (1)
health_data_store
health_data_store/test/src/repositories/blood_pressure_repository_test.dart
@@ -131,6 +131,17 @@ void main() {
     ));
     expect(values, isEmpty);
   });
+  test('should not return records out of range', () async {
+    final db = await mockDBManager();
+    addTearDown(db.close);
+    final repo = BloodPressureRepositoryImpl(db.db);
+    final r1 = mockRecord(time: 10000, sys: 456, dia: 457, pul: 458);
+    await repo.add(r1);
 
-  // TODO: not return records out of range
+    final values = await repo.get(DateRange(
+      start: DateTime.fromMillisecondsSinceEpoch(20000),
+      end: DateTime.fromMillisecondsSinceEpoch(80000),
+    ));
+    expect(values, isEmpty);
+  });
 }