-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into mb/TTAHUB-3134/adjust…
…-goal-permissions
- Loading branch information
Showing
6 changed files
with
86 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ module.exports = { | |
ssl: true, | ||
}, | ||
pool: { | ||
max: 10, | ||
max: 30, | ||
validate: connectionValidation, | ||
}, | ||
}, | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { ActivityReportCollaborator } from '..'; | ||
import { auditLogger } from '../../logger'; | ||
|
||
jest.mock('../../logger'); | ||
|
||
describe('ActivityReportCollaborator Model', () => { | ||
it('should handle undefined user gracefully', () => { | ||
const instance = new ActivityReportCollaborator(); | ||
instance.user = undefined; | ||
instance.userId = 1; | ||
|
||
expect(() => instance.fullName).not.toThrow(); | ||
expect(auditLogger.error).toHaveBeenCalled(); | ||
expect(instance.fullName).toBe(''); | ||
}); | ||
|
||
it('should return correct fullName when user and roles are defined', () => { | ||
const instance = new ActivityReportCollaborator(); | ||
instance.user = { name: 'Joe Brown', roles: [{ name: 'Admin' }] }; | ||
instance.roles = [{ name: 'GS' }]; | ||
|
||
expect(instance.fullName).toEqual('Joe Brown, GS'); | ||
}); | ||
}); |
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