Skip to content

Commit

Permalink
added test depth is rounded in title (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
josefbogar authored Sep 11, 2024
1 parent b985546 commit b6a3de9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/missingTests.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 6 additions & 1 deletion projects/planner/src/app/shared/dives.schedule.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down Expand Up @@ -110,4 +116,3 @@ describe('Scheduled dives', () => {
});
});
});

0 comments on commit b6a3de9

Please sign in to comment.