Commit e753beec authored by Marvin Karegyeya's avatar Marvin Karegyeya Committed by Phil Hughes

Replace board service in board card spec.js

parent b90b96b3
---
title: removes references of BoardService
merge_request: 20881
author: nuwe1
type: other
......@@ -13,7 +13,7 @@ import '~/boards/models/list';
import store from '~/boards/stores';
import boardsStore from '~/boards/stores/boards_store';
import boardCard from '~/boards/components/board_card.vue';
import { listObj, boardsMockInterceptor, mockBoardService } from './mock_data';
import { listObj, boardsMockInterceptor, setMockEndpoints } from './mock_data';
describe('Board card', () => {
let vm;
......@@ -22,8 +22,8 @@ describe('Board card', () => {
beforeEach(done => {
mock = new MockAdapter(axios);
mock.onAny().reply(boardsMockInterceptor);
setMockEndpoints();
gl.boardService = mockBoardService();
boardsStore.create();
boardsStore.detail.issue = {};
......
import BoardService from '~/boards/services/board_service';
import boardsStore from '~/boards/stores/boards_store';
export const setMockEndpoints = (opts = {}) => {
const boardsEndpoint = opts.boardsEndpoint || '/test/issue-boards/-/boards.json';
const listsEndpoint = opts.listsEndpoint || '/test/-/boards/1/lists';
const bulkUpdatePath = opts.bulkUpdatePath || '';
const boardId = opts.boardId || '1';
boardsStore.setEndpoints({
boardsEndpoint,
listsEndpoint,
bulkUpdatePath,
boardId,
});
};
export const boardObj = {
id: 1,
name: 'test',
......
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