diff --git a/doc/missingTests.md b/doc/missingTests.md index 6efd19bb..0e3d2a07 100644 --- a/doc/missingTests.md +++ b/doc/missingTests.md @@ -1,6 +1,6 @@ # TODO missing test cases -* Dive Schedule.label is rounded + * BlendPricing, BlendPricingService, BlendPricingComponent * Diver.component.ts: Add tests for rmv and stressRmv save and load * AppSettingsComponent: diff --git a/projects/planner/src/app/shared/dives.schedule.spec.ts b/projects/planner/src/app/shared/dives.schedule.spec.ts index b58f13d9..55910eac 100644 --- a/projects/planner/src/app/shared/dives.schedule.spec.ts +++ b/projects/planner/src/app/shared/dives.schedule.spec.ts @@ -77,6 +77,12 @@ describe('Scheduled dives', () => { it('Assigns dive number', () => { expect(sut.dives[1].id).toEqual(2); }); + + it('Rounds to whole meters', () => { + sut.dives[1].depths.plannedDepth = 31.287; + const expectedDepth = 31; + expect(sut.dives[1].title).toEqual(`2. ${expectedDepth} m, 12 min`); + }); }); describe('Remove dive', () => { @@ -110,4 +116,3 @@ describe('Scheduled dives', () => { }); }); }); -