Commit 3d9dc7db authored by Fatih Acet's avatar 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
parents 939563a7 5b71c8b2
...@@ -374,6 +374,10 @@ const boardsStore = { ...@@ -374,6 +374,10 @@ const boardsStore = {
deleteBoard({ id }) { deleteBoard({ id }) {
return axios.delete(this.generateBoardsPath(id)); return axios.delete(this.generateBoardsPath(id));
}, },
setCurrentBoard(board) {
this.state.currentBoard = board;
},
}; };
BoardsStoreEE.initEESpecific(boardsStore); BoardsStoreEE.initEESpecific(boardsStore);
......
...@@ -365,4 +365,17 @@ describe('Store', () => { ...@@ -365,4 +365,17 @@ describe('Store', () => {
expect(boardsStore.timeTracking.limitToHours).toEqual(true); 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment