diff options
Diffstat (limited to 'spec/frontend/ci_variable_list/components/ci_variable_settings_spec.js')
-rw-r--r-- | spec/frontend/ci_variable_list/components/ci_variable_settings_spec.js | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/spec/frontend/ci_variable_list/components/ci_variable_settings_spec.js b/spec/frontend/ci_variable_list/components/ci_variable_settings_spec.js deleted file mode 100644 index 13e417940a8..00000000000 --- a/spec/frontend/ci_variable_list/components/ci_variable_settings_spec.js +++ /dev/null @@ -1,38 +0,0 @@ -import { shallowMount } from '@vue/test-utils'; -import Vue from 'vue'; -import Vuex from 'vuex'; -import CiVariableSettings from '~/ci_variable_list/components/ci_variable_settings.vue'; -import createStore from '~/ci_variable_list/store'; - -Vue.use(Vuex); - -describe('Ci variable table', () => { - let wrapper; - let store; - let isGroup; - - const createComponent = (groupState) => { - store = createStore(); - store.state.isGroup = groupState; - jest.spyOn(store, 'dispatch').mockImplementation(); - wrapper = shallowMount(CiVariableSettings, { - store, - }); - }; - - afterEach(() => { - wrapper.destroy(); - }); - - it('dispatches fetchEnvironments when mounted', () => { - isGroup = false; - createComponent(isGroup); - expect(store.dispatch).toHaveBeenCalledWith('fetchEnvironments'); - }); - - it('does not dispatch fetchenvironments when in group context', () => { - isGroup = true; - createComponent(isGroup); - expect(store.dispatch).not.toHaveBeenCalled(); - }); -}); |