diff options
Diffstat (limited to 'spec/frontend/releases/components/releases_pagination_graphql_spec.js')
-rw-r--r-- | spec/frontend/releases/components/releases_pagination_graphql_spec.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/frontend/releases/components/releases_pagination_graphql_spec.js b/spec/frontend/releases/components/releases_pagination_graphql_spec.js index de80d82e93c..5b2dd4bc784 100644 --- a/spec/frontend/releases/components/releases_pagination_graphql_spec.js +++ b/spec/frontend/releases/components/releases_pagination_graphql_spec.js @@ -3,7 +3,7 @@ import Vuex from 'vuex'; import { historyPushState } from '~/lib/utils/common_utils'; import ReleasesPaginationGraphql from '~/releases/components/releases_pagination_graphql.vue'; import createStore from '~/releases/stores'; -import createListModule from '~/releases/stores/modules/list'; +import createIndexModule from '~/releases/stores/modules/index'; jest.mock('~/lib/utils/common_utils', () => ({ ...jest.requireActual('~/lib/utils/common_utils'), @@ -15,7 +15,7 @@ localVue.use(Vuex); describe('~/releases/components/releases_pagination_graphql.vue', () => { let wrapper; - let listModule; + let indexModule; const cursors = { startCursor: 'startCursor', @@ -25,16 +25,16 @@ describe('~/releases/components/releases_pagination_graphql.vue', () => { const projectPath = 'my/project'; const createComponent = (pageInfo) => { - listModule = createListModule({ projectPath }); + indexModule = createIndexModule({ projectPath }); - listModule.state.graphQlPageInfo = pageInfo; + indexModule.state.graphQlPageInfo = pageInfo; - listModule.actions.fetchReleases = jest.fn(); + indexModule.actions.fetchReleases = jest.fn(); wrapper = mount(ReleasesPaginationGraphql, { store: createStore({ modules: { - list: listModule, + index: indexModule, }, featureFlags: {}, }), @@ -142,7 +142,7 @@ describe('~/releases/components/releases_pagination_graphql.vue', () => { }); it('calls fetchReleases with the correct after cursor', () => { - expect(listModule.actions.fetchReleases.mock.calls).toEqual([ + expect(indexModule.actions.fetchReleases.mock.calls).toEqual([ [expect.anything(), { after: cursors.endCursor }], ]); }); @@ -160,7 +160,7 @@ describe('~/releases/components/releases_pagination_graphql.vue', () => { }); it('calls fetchReleases with the correct before cursor', () => { - expect(listModule.actions.fetchReleases.mock.calls).toEqual([ + expect(indexModule.actions.fetchReleases.mock.calls).toEqual([ [expect.anything(), { before: cursors.startCursor }], ]); }); |