From ea88161502022543b6080ce7de1f6e4d1789b6ff Mon Sep 17 00:00:00 2001 From: Tresor Mvumbi Date: Thu, 3 Sep 2020 16:52:54 +0200 Subject: [PATCH] COM-921 Fix unit test A six months period can have 181 days (i.e. 1 Jan 2018 - 1 Jul 2018) --- ui/test/unit/clinical/models/drugOrderViewModel.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/test/unit/clinical/models/drugOrderViewModel.spec.js b/ui/test/unit/clinical/models/drugOrderViewModel.spec.js index d2dd2da21..018ecb4b3 100644 --- a/ui/test/unit/clinical/models/drugOrderViewModel.spec.js +++ b/ui/test/unit/clinical/models/drugOrderViewModel.spec.js @@ -388,7 +388,7 @@ describe("drugOrderViewModel", function () { treatment.durationUnit = "Mois"; treatment.calculateDurationInDays(); - expect(treatment.durationInDays >= 182 && treatment.durationInDays < 185).toBeTruthy(); + expect(treatment.durationInDays >= 181 && treatment.durationInDays < 185).toBeTruthy(); treatment.durationUnit = "Day(s)" treatment.calculateDurationInDays();