summaryrefslogtreecommitdiff
path: root/spec/frontend/ci_variable_list/components/legacy_ci_variable_settings_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ci_variable_list/components/legacy_ci_variable_settings_spec.js')
-rw-r--r--spec/frontend/ci_variable_list/components/legacy_ci_variable_settings_spec.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/frontend/ci_variable_list/components/legacy_ci_variable_settings_spec.js b/spec/frontend/ci_variable_list/components/legacy_ci_variable_settings_spec.js
index 9c941f99982..7def4dd4f29 100644
--- a/spec/frontend/ci_variable_list/components/legacy_ci_variable_settings_spec.js
+++ b/spec/frontend/ci_variable_list/components/legacy_ci_variable_settings_spec.js
@@ -9,11 +9,11 @@ Vue.use(Vuex);
describe('Ci variable table', () => {
let wrapper;
let store;
- let isGroup;
+ let isProject;
- const createComponent = (groupState) => {
+ const createComponent = (projectState) => {
store = createStore();
- store.state.isGroup = groupState;
+ store.state.isProject = projectState;
jest.spyOn(store, 'dispatch').mockImplementation();
wrapper = shallowMount(LegacyCiVariableSettings, {
store,
@@ -25,14 +25,14 @@ describe('Ci variable table', () => {
});
it('dispatches fetchEnvironments when mounted', () => {
- isGroup = false;
- createComponent(isGroup);
+ isProject = true;
+ createComponent(isProject);
expect(store.dispatch).toHaveBeenCalledWith('fetchEnvironments');
});
it('does not dispatch fetchenvironments when in group context', () => {
- isGroup = true;
- createComponent(isGroup);
+ isProject = false;
+ createComponent(isProject);
expect(store.dispatch).not.toHaveBeenCalled();
});
});