Commit 5f6b3760 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'Replace-BoardService_in_board_card_spec.js' into 'master'

Replace board service in board card spec.js

See merge request gitlab-org/gitlab!20881
parents b90b96b3 e753beec
---
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