Commit 71adfb2f authored by Mark Florian's avatar Mark Florian

Use more common createFlash name for import

parent 5174e854
...@@ -6,7 +6,7 @@ import ReportSection from '~/reports/components/report_section.vue'; ...@@ -6,7 +6,7 @@ import ReportSection from '~/reports/components/report_section.vue';
import { LOADING, ERROR, SLOT_SUCCESS, SLOT_LOADING, SLOT_ERROR } from '~/reports/constants'; import { LOADING, ERROR, SLOT_SUCCESS, SLOT_LOADING, SLOT_ERROR } from '~/reports/constants';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import { normalizeHeaders, parseIntPagination } from '~/lib/utils/common_utils'; import { normalizeHeaders, parseIntPagination } from '~/lib/utils/common_utils';
import Flash from '~/flash'; import createFlash from '~/flash';
import Api from '~/api'; import Api from '~/api';
import SecuritySummary from './components/security_summary.vue'; import SecuritySummary from './components/security_summary.vue';
import store from './store'; import store from './store';
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
this.fetchCounts(); this.fetchCounts();
}) })
.catch(error => { .catch(error => {
Flash({ createFlash({
message: this.$options.i18n.apiError, message: this.$options.i18n.apiError,
captureError: true, captureError: true,
error, error,
......
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
secretScanningDiffSuccessMock, secretScanningDiffSuccessMock,
} from 'jest/vue_shared/security_reports/mock_data'; } from 'jest/vue_shared/security_reports/mock_data';
import Api from '~/api'; import Api from '~/api';
import Flash from '~/flash'; import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
import { import {
REPORT_TYPE_SAST, REPORT_TYPE_SAST,
...@@ -199,8 +199,8 @@ describe('Security reports app', () => { ...@@ -199,8 +199,8 @@ describe('Security reports app', () => {
expect(wrapper.html()).toBe(''); expect(wrapper.html()).toBe('');
}); });
it('calls Flash correctly', () => { it('calls createFlash correctly', () => {
expect(Flash.mock.calls).toEqual([ expect(createFlash.mock.calls).toEqual([
[ [
{ {
message: SecurityReportsApp.i18n.apiError, message: SecurityReportsApp.i18n.apiError,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment