forked from bcgov/common-hosted-form-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: FORMS-1265 consistency and coverage (bcgov#1369)
- Loading branch information
1 parent
82180e1
commit cc49b3e
Showing
23 changed files
with
763 additions
and
679 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 |
---|---|---|
|
@@ -136,19 +136,19 @@ describe('idpService', () => { | |
it('should return a user search', async () => { | ||
const s = await idpService.userSearch({ idpCode: 'idir', email: '[email protected]' }); | ||
expect(s).toBeFalsy(); | ||
expect(MockModel.query).toHaveBeenCalledTimes(1); | ||
expect(MockModel.modify).toHaveBeenCalledTimes(9); | ||
expect(MockModel.modify).toHaveBeenCalledWith('filterIdpCode', 'idir'); | ||
expect(MockModel.modify).toHaveBeenCalledWith('filterEmail', '[email protected]', false); | ||
expect(MockModel.query).toBeCalledTimes(1); | ||
expect(MockModel.modify).toBeCalledTimes(9); | ||
expect(MockModel.modify).toBeCalledWith('filterIdpCode', 'idir'); | ||
expect(MockModel.modify).toBeCalledWith('filterEmail', '[email protected]', false); | ||
}); | ||
|
||
it('should return a customized user search', async () => { | ||
const s = await idpService.userSearch({ idpCode: 'bceid-business', email: '[email protected]' }); | ||
expect(s).toBeFalsy(); | ||
expect(MockModel.query).toHaveBeenCalledTimes(1); | ||
expect(MockModel.modify).toHaveBeenCalledWith('filterIdpCode', 'bceid-business'); | ||
expect(MockModel.modify).toHaveBeenCalledWith('filterEmail', '[email protected]', true); | ||
expect(MockModel.modify).toHaveBeenCalledTimes(9); | ||
expect(MockModel.query).toBeCalledTimes(1); | ||
expect(MockModel.modify).toBeCalledWith('filterIdpCode', 'bceid-business'); | ||
expect(MockModel.modify).toBeCalledWith('filterEmail', '[email protected]', true); | ||
expect(MockModel.modify).toBeCalledTimes(9); | ||
}); | ||
|
||
it('should throw error when customized user search fails validation', async () => { | ||
|
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
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
Oops, something went wrong.