提交 3d9dc7db 编写于 作者: F Fatih Acet

Merge branch 'winh-move-setCurrentBoard' into 'master'

Move setCurrentBoard() from BoardsStoreEE to core  (CE-backport)

See merge request gitlab-org/gitlab-ce!30626
......@@ -374,6 +374,10 @@ const boardsStore = {
deleteBoard({ id }) {
return axios.delete(this.generateBoardsPath(id));
},
setCurrentBoard(board) {
this.state.currentBoard = board;
},
};
BoardsStoreEE.initEESpecific(boardsStore);
......
......@@ -365,4 +365,17 @@ describe('Store', () => {
expect(boardsStore.timeTracking.limitToHours).toEqual(true);
});
});
describe('setCurrentBoard', () => {
const dummyBoard = 'hoverboard';
it('sets the current board', () => {
const { state } = boardsStore;
state.currentBoard = null;
boardsStore.setCurrentBoard(dummyBoard);
expect(state.currentBoard).toEqual(dummyBoard);
});
});
});
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册