diff options
Diffstat (limited to 'spec/frontend/ide/stores/actions/merge_request_spec.js')
-rw-r--r-- | spec/frontend/ide/stores/actions/merge_request_spec.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/frontend/ide/stores/actions/merge_request_spec.js b/spec/frontend/ide/stores/actions/merge_request_spec.js index 600bd5fe9e1..e62811a4517 100644 --- a/spec/frontend/ide/stores/actions/merge_request_spec.js +++ b/spec/frontend/ide/stores/actions/merge_request_spec.js @@ -2,7 +2,7 @@ import MockAdapter from 'axios-mock-adapter'; import { range } from 'lodash'; import { TEST_HOST } from 'helpers/test_constants'; import testAction from 'helpers/vuex_action_helper'; -import { deprecatedCreateFlash as createFlash } from '~/flash'; +import createFlash from '~/flash'; import { leftSidebarViews, PERMISSION_READ_MR, MAX_MR_FILES_AUTO_OPEN } from '~/ide/constants'; import service from '~/ide/services'; import { createStore } from '~/ide/stores'; @@ -145,7 +145,9 @@ describe('IDE store merge request actions', () => { .dispatch('getMergeRequestsForBranch', { projectId: TEST_PROJECT, branchId: 'bar' }) .catch(() => { expect(createFlash).toHaveBeenCalled(); - expect(createFlash.mock.calls[0][0]).toBe('Error fetching merge requests for bar'); + expect(createFlash.mock.calls[0][0].message).toBe( + 'Error fetching merge requests for bar', + ); }) .then(done) .catch(done.fail); @@ -461,11 +463,11 @@ describe('IDE store merge request actions', () => { }; store.state.currentProjectId = 'test/test'; - store.state.currentBranchId = 'master'; + store.state.currentBranchId = 'main'; store.state.projects['test/test'] = { branches: { - master: { + main: { commit: { id: '7297abc', }, @@ -562,7 +564,9 @@ describe('IDE store merge request actions', () => { openMergeRequest(store, mr) .catch(() => { - expect(createFlash).toHaveBeenCalledWith(expect.any(String)); + expect(createFlash).toHaveBeenCalledWith({ + message: expect.any(String), + }); }) .then(done) .catch(done.fail); |