Commit 37946c88 authored by Phil Hughes's avatar Phil Hughes

Fixed karma

parent b9aa6772
......@@ -3,6 +3,7 @@
import Flash from '~/flash';
import PopupDialog from '~/vue_shared/components/popup_dialog.vue';
import { visitUrl } from '../../lib/utils/url_utility';
import BoardMilestoneSelect from './milestone_select.vue';
import BoardWeightSelect from './weight_select.vue';
import BoardLabelsSelect from './labels_select.vue';
......@@ -138,7 +139,7 @@ export default {
if (this.isDeleteForm) {
gl.boardService.deleteBoard(this.currentBoard)
.then(() => {
gl.utils.visitUrl(Store.rootPath);
visitUrl(Store.rootPath);
})
.catch(() => {
Flash('Failed to delete board. Please try again.');
......@@ -148,7 +149,7 @@ export default {
gl.boardService.createBoard(this.board)
.then(resp => resp.json())
.then((data) => {
gl.utils.visitUrl(data.board_path);
visitUrl(data.board_path);
})
.catch(() => {
Flash('Unable to save your changes. Please try again.');
......
......@@ -4,7 +4,7 @@ import epicHeader from 'ee/epics/epic_show/components/epic_header.vue';
import epicSidebar from 'ee/epics/sidebar/components/sidebar_app.vue';
import issuableApp from '~/issue_show/components/app.vue';
import issuableAppEventHub from '~/issue_show/event_hub';
import '~/lib/utils/url_utility';
import * as urlUtils from '~/lib/utils/url_utility';
import mountComponent from '../../../helpers/vue_mount_component_helper';
import { props } from '../mock_data';
import issueShowData from '../../../issue_show/mock_data';
......@@ -102,7 +102,7 @@ describe('EpicShowApp', () => {
const deleteIssuable = jasmine.createSpy();
issuableAppEventHub.$on('delete.issuable', deleteIssuable);
spyOn(window, 'confirm').and.returnValue(true);
spyOn(gl.utils, 'visitUrl').and.callFake(() => {});
spyOn(urlUtils, 'visitUrl').and.callFake(() => {});
vm.$el.querySelector('.detail-page-header .btn-remove').click();
expect(deleteIssuable).toHaveBeenCalled();
......
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