diff --git a/backend/server/test/unit/utils/qualificationsUtils.spec.js b/backend/server/test/unit/utils/qualificationsUtils.spec.js index 97c7bd4458..e564dcf0d6 100644 --- a/backend/server/test/unit/utils/qualificationsUtils.spec.js +++ b/backend/server/test/unit/utils/qualificationsUtils.spec.js @@ -23,6 +23,15 @@ describe('qualificationsUtils', () => { expect(returnedValue).to.deep.equal('This is a qual (level 4)'); }); + + it('should return the title with the level in brackets when the qual already has brackets', () => { + const title = 'This is a qual (ABC)'; + const level = '6'; + + const returnedValue = formatQualificationTitle(title, level); + + expect(returnedValue).to.deep.equal('This is a qual (ABC, level 6)'); + }); }) }); });