diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 12:55:51 +0300 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/frontend/security_configuration/utils_spec.js | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/frontend/security_configuration/utils_spec.js')
-rw-r--r-- | spec/frontend/security_configuration/utils_spec.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/spec/frontend/security_configuration/utils_spec.js b/spec/frontend/security_configuration/utils_spec.js index 6ad167cadda..eaed4532baa 100644 --- a/spec/frontend/security_configuration/utils_spec.js +++ b/spec/frontend/security_configuration/utils_spec.js @@ -35,7 +35,15 @@ const mockValidCustomFeature = [ { name: 'SAST', type: 'SAST', - customfield: 'customvalue', + customField: 'customvalue', + }, +]; + +const mockValidCustomFeatureSnakeCase = [ + { + name: 'SAST', + type: 'SAST', + custom_field: 'customvalue', }, ]; @@ -79,3 +87,15 @@ describe('returns an object with augmentedSecurityFeatures and augmentedComplian ).toEqual(expectedOutputCustomFeature); }); }); + +describe('returns an object with camelcased keys', () => { + it('given a customfeature in snakecase', () => { + expect( + augmentFeatures( + mockSecurityFeatures, + mockComplianceFeatures, + mockValidCustomFeatureSnakeCase, + ), + ).toEqual(expectedOutputCustomFeature); + }); +}); |