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';
import { LOADING, ERROR, SLOT_SUCCESS, SLOT_LOADING, SLOT_ERROR } from '~/reports/constants';
import { s__ } from '~/locale';
import { normalizeHeaders, parseIntPagination } from '~/lib/utils/common_utils';
import Flash from '~/flash';
import createFlash from '~/flash';
import Api from '~/api';
import SecuritySummary from './components/security_summary.vue';
import store from './store';
......@@ -82,7 +82,7 @@ export default {
this.fetchCounts();
})
.catch(error => {
Flash({
createFlash({
message: this.$options.i18n.apiError,
captureError: true,
error,
......
......@@ -9,7 +9,7 @@ import {
secretScanningDiffSuccessMock,
} from 'jest/vue_shared/security_reports/mock_data';
import Api from '~/api';
import Flash from '~/flash';
import createFlash from '~/flash';
import axios from '~/lib/utils/axios_utils';
import {
REPORT_TYPE_SAST,
......@@ -199,8 +199,8 @@ describe('Security reports app', () => {
expect(wrapper.html()).toBe('');
});
it('calls Flash correctly', () => {
expect(Flash.mock.calls).toEqual([
it('calls createFlash correctly', () => {
expect(createFlash.mock.calls).toEqual([
[
{
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