diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 21:11:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-16 21:11:26 +0300 |
commit | 8fa0c53e26c947ac647b8067fde3e9673b77b1a6 (patch) | |
tree | da32e7224125973e9e87d3856fb7e672ff41c8b1 /spec/frontend/ci_variable_list/store/utils_spec.js | |
parent | 0552020767452da44de2bf5424096f2cb2ea6bf5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ci_variable_list/store/utils_spec.js')
-rw-r--r-- | spec/frontend/ci_variable_list/store/utils_spec.js | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/spec/frontend/ci_variable_list/store/utils_spec.js b/spec/frontend/ci_variable_list/store/utils_spec.js deleted file mode 100644 index 5b10370324a..00000000000 --- a/spec/frontend/ci_variable_list/store/utils_spec.js +++ /dev/null @@ -1,49 +0,0 @@ -import { - prepareDataForDisplay, - prepareEnvironments, - prepareDataForApi, -} from '~/ci_variable_list/store/utils'; -import mockData from '../services/mock_data'; - -describe('CI variables store utils', () => { - it('prepares ci variables for display', () => { - expect(prepareDataForDisplay(mockData.mockVariablesApi)).toStrictEqual( - mockData.mockVariablesDisplay, - ); - }); - - it('prepares single ci variable for api', () => { - expect(prepareDataForApi(mockData.mockVariablesDisplay[0])).toStrictEqual({ - environment_scope: '*', - id: 113, - key: 'test_var', - masked: 'false', - protected: 'false', - secret_value: 'test_val', - value: 'test_val', - variable_type: 'env_var', - }); - - expect(prepareDataForApi(mockData.mockVariablesDisplay[1])).toStrictEqual({ - environment_scope: '*', - id: 114, - key: 'test_var_2', - masked: 'false', - protected: 'false', - secret_value: 'test_val_2', - value: 'test_val_2', - variable_type: 'file', - }); - }); - - it('prepares single ci variable for delete', () => { - expect(prepareDataForApi(mockData.mockVariablesDisplay[0], true)).toHaveProperty( - '_destroy', - true, - ); - }); - - it('prepares environments for display', () => { - expect(prepareEnvironments(mockData.mockEnvironments)).toStrictEqual(['staging', 'production']); - }); -}); |