blob: 7ad9654565244e580ebe5251dc45ae0befb0352d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import * as getters from '~/ci_variable_list/store/getters';
import mockData from '../services/mock_data';
describe('Ci variable getters', () => {
describe('joinedEnvironments', () => {
it('should join fetched enviroments with variable environment scopes', () => {
const state = {
environments: ['All (default)', 'staging', 'deployment', 'prod'],
variables: mockData.mockVariableScopes,
};
expect(getters.joinedEnvironments(state)).toEqual([
'All (default)',
'deployment',
'prod',
'production',
'staging',
]);
});
});
});
|