-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use level uuids rather than level numbers (#26)
Part of fix for [DHIS2-6990] The api has supported use of uid since 2.31 [DHIS2- 4889]
- Loading branch information
1 parent
e1f19b0
commit 9fb17b9
Showing
3 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { getLevelsFromIds } from '../orgUnitDimensions' | ||
|
||
const levelOptions = [{ id: 'fluttershy' }, { id: 'rarity' }] | ||
|
||
describe('orgUnitDimension module', () => { | ||
it('returns array with id when level-id received', () => { | ||
expect(getLevelsFromIds(['abc', 'LEVEL-rarity'], levelOptions)).toEqual( | ||
['rarity'] | ||
) | ||
}) | ||
|
||
it('returns empty array when level-id not received', () => { | ||
expect(getLevelsFromIds(['abc', 'rarity'], levelOptions)).toEqual([]) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters