diff options
author | Marcia Ramos <virtua.creative@gmail.com> | 2019-04-10 17:05:46 +0100 |
---|---|---|
committer | Marcia Ramos <virtua.creative@gmail.com> | 2019-04-10 17:05:46 +0100 |
commit | cbd6841cac8185f181a5dcec33704f6e7c040732 (patch) | |
tree | 423bbc4fb873ab51590d0be4ae594769c80b739b /spec/frontend/serverless | |
parent | 3402f8c817e9798eed9d86555f3f85fd10f49abf (diff) | |
parent | 490b31f740d23b54a62588cd9fd0e0cf7fdd9370 (diff) | |
download | gitlab-ce-docs-pages-intro.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into docs-pages-introdocs-pages-intro
Diffstat (limited to 'spec/frontend/serverless')
-rw-r--r-- | spec/frontend/serverless/components/functions_spec.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/frontend/serverless/components/functions_spec.js b/spec/frontend/serverless/components/functions_spec.js index 5533de1a70a..7af33ceaadc 100644 --- a/spec/frontend/serverless/components/functions_spec.js +++ b/spec/frontend/serverless/components/functions_spec.js @@ -4,14 +4,21 @@ import axios from '~/lib/utils/axios_utils'; import functionsComponent from '~/serverless/components/functions.vue'; import { createLocalVue, shallowMount } from '@vue/test-utils'; import { createStore } from '~/serverless/store'; +import { TEST_HOST } from 'helpers/test_constants'; import { mockServerlessFunctions } from '../mock_data'; describe('functionsComponent', () => { + const statusPath = `${TEST_HOST}/statusPath`; + let component; let store; let localVue; + let axiosMock; beforeEach(() => { + axiosMock = new AxiosMockAdapter(axios); + axiosMock.onGet(statusPath).reply(200); + localVue = createLocalVue(); localVue.use(Vuex); @@ -20,6 +27,7 @@ describe('functionsComponent', () => { afterEach(() => { component.vm.$destroy(); + axiosMock.restore(); }); it('should render empty state when Knative is not installed', () => { @@ -80,11 +88,7 @@ describe('functionsComponent', () => { ); }); - fit('should render the functions list', () => { - const statusPath = 'statusPath'; - const axiosMock = new AxiosMockAdapter(axios); - axiosMock.onGet(statusPath).reply(200); - + it('should render the functions list', () => { component = shallowMount(functionsComponent, { localVue, store, |