Skip to content

Commit

Permalink
test: add unit test for getOuLevelAndGroupText
Browse files Browse the repository at this point in the history
  • Loading branch information
janhenrikoverland committed Nov 22, 2024
1 parent 0345b36 commit 6e62152
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/modules/__tests__/getOuLevelAndGroupText.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,15 @@ describe('getOuLevelAndGroupText', () => {
'Fruit and Veggies groups - Second floor levels'
)
})

it('grabs name for user orgunits from items when not present in metaData', () => {
filter.items = [
{ id: 'USER_ORGUNIT', name: 'User organisation unit' },
{ id: 'LEVEL-2nd-floor' },
]

expect(getOuLevelAndGroupText(filter, metaData)).toEqual(
'Second floor levels in User organisation unit'
)
})
})

0 comments on commit 6e62152

Please sign in to comment.