Skip to content

Commit

Permalink
test: add unit test for share permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Oct 20, 2023
1 parent 6d64aa1 commit 4e8b6c9
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ describe('getAbilities', () => {
const expectedActions = ['create-all']
expect(abilities).toEqual(expectedActions.map((action) => ({ action, subject: 'PublicLink' })))
})
it('gets correct abilities for subject "Share"', function () {
const abilities = getAbilities(['Share.Create.all'])
const expectedActions = ['create-all']
expect(abilities).toEqual(expectedActions.map((action) => ({ action, subject: 'Share' })))
})
it('gets correct abilities for subject "Setting"', function () {
const abilities = getAbilities(['Settings.ReadWrite.all'])
const expectedActions = ['read-all', 'update-all']
Expand Down

0 comments on commit 4e8b6c9

Please sign in to comment.