diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-05-20 14:05:26 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-05-20 14:05:26 +0300 |
commit | 3e417f4ba22ed53f808c3e0fdc5de0350d62d2c2 (patch) | |
tree | 52d86782e317ba843643960756c494349a51a667 /spec | |
parent | 0c1cd36afbc27c577f0d04771827518e84a6739d (diff) |
Create empty Vuex store for issue boards
Diffstat (limited to 'spec')
-rw-r--r-- | spec/frontend/boards/stores/actions_spec.js | 67 | ||||
-rw-r--r-- | spec/frontend/boards/stores/mutations_spec.js | 91 | ||||
-rw-r--r-- | spec/frontend/boards/stores/state_spec.js | 11 |
3 files changed, 169 insertions, 0 deletions
diff --git a/spec/frontend/boards/stores/actions_spec.js b/spec/frontend/boards/stores/actions_spec.js new file mode 100644 index 00000000000..d23393db60d --- /dev/null +++ b/spec/frontend/boards/stores/actions_spec.js @@ -0,0 +1,67 @@ +import actions from '~/boards/stores/actions'; + +const expectNotImplemented = action => { + it('is not implemented', () => { + expect(action).toThrow(new Error('Not implemented!')); + }); +}; + +describe('setEndpoints', () => { + expectNotImplemented(actions.setEndpoints); +}); + +describe('fetchLists', () => { + expectNotImplemented(actions.fetchLists); +}); + +describe('generateDefaultLists', () => { + expectNotImplemented(actions.generateDefaultLists); +}); + +describe('createList', () => { + expectNotImplemented(actions.createList); +}); + +describe('updateList', () => { + expectNotImplemented(actions.updateList); +}); + +describe('deleteList', () => { + expectNotImplemented(actions.deleteList); +}); + +describe('fetchIssuesForList', () => { + expectNotImplemented(actions.fetchIssuesForList); +}); + +describe('moveIssue', () => { + expectNotImplemented(actions.moveIssue); +}); + +describe('createNewIssue', () => { + expectNotImplemented(actions.createNewIssue); +}); + +describe('fetchBacklog', () => { + expectNotImplemented(actions.fetchBacklog); +}); + +describe('bulkUpdateIssues', () => { + expectNotImplemented(actions.bulkUpdateIssues); +}); + +describe('fetchIssue', () => { + expectNotImplemented(actions.fetchIssue); +}); + +describe('toggleIssueSubscription', () => { + expectNotImplemented(actions.toggleIssueSubscription); +}); + +describe('showPage', () => { + expectNotImplemented(actions.showPage); +}); + +describe('toggleEmptyState', () => { + expectNotImplemented(actions.toggleEmptyState); +}); diff --git a/spec/frontend/boards/stores/mutations_spec.js b/spec/frontend/boards/stores/mutations_spec.js new file mode 100644 index 00000000000..aa477766978 --- /dev/null +++ b/spec/frontend/boards/stores/mutations_spec.js @@ -0,0 +1,91 @@ +import mutations from '~/boards/stores/mutations'; + +const expectNotImplemented = action => { + it('is not implemented', () => { + expect(action).toThrow(new Error('Not implemented!')); + }); +}; + +describe('SET_ENDPOINTS', () => { + expectNotImplemented(mutations.SET_ENDPOINTS); +}); + +describe('REQUEST_ADD_LIST', () => { + expectNotImplemented(mutations.REQUEST_ADD_LIST); +}); + +describe('RECEIVE_ADD_LIST_SUCCESS', () => { + expectNotImplemented(mutations.RECEIVE_ADD_LIST_SUCCESS); +}); + +describe('RECEIVE_ADD_LIST_ERROR', () => { + expectNotImplemented(mutations.RECEIVE_ADD_LIST_ERROR); +}); + +describe('REQUEST_UPDATE_LIST', () => { + expectNotImplemented(mutations.REQUEST_UPDATE_LIST); +}); + +describe('RECEIVE_UPDATE_LIST_SUCCESS', () => { + expectNotImplemented(mutations.RECEIVE_UPDATE_LIST_SUCCESS); +}); + +describe('RECEIVE_UPDATE_LIST_ERROR', () => { + expectNotImplemented(mutations.RECEIVE_UPDATE_LIST_ERROR); +}); + +describe('REQUEST_REMOVE_LIST', () => { + expectNotImplemented(mutations.REQUEST_REMOVE_LIST); +}); + +describe('RECEIVE_REMOVE_LIST_SUCCESS', () => { + expectNotImplemented(mutations.RECEIVE_REMOVE_LIST_SUCCESS); +}); + +describe('RECEIVE_REMOVE_LIST_ERROR', () => { + expectNotImplemented(mutations.RECEIVE_REMOVE_LIST_ERROR); +}); + +describe('REQUEST_ADD_ISSUE', () => { + expectNotImplemented(mutations.REQUEST_ADD_ISSUE); +}); + +describe('RECEIVE_ADD_ISSUE_SUCCESS', () => { + expectNotImplemented(mutations.RECEIVE_ADD_ISSUE_SUCCESS); +}); + +describe('RECEIVE_ADD_ISSUE_ERROR', () => { + expectNotImplemented(mutations.RECEIVE_ADD_ISSUE_ERROR); +}); + +describe('REQUEST_MOVE_ISSUE', () => { + expectNotImplemented(mutations.REQUEST_MOVE_ISSUE); +}); + +describe('RECEIVE_MOVE_ISSUE_SUCCESS', () => { + expectNotImplemented(mutations.RECEIVE_MOVE_ISSUE_SUCCESS); +}); + +describe('RECEIVE_MOVE_ISSUE_ERROR', () => { + expectNotImplemented(mutations.RECEIVE_MOVE_ISSUE_ERROR); +}); + +describe('REQUEST_UPDATE_ISSUE', () => { + expectNotImplemented(mutations.REQUEST_UPDATE_ISSUE); +}); + +describe('RECEIVE_UPDATE_ISSUE_SUCCESS', () => { + expectNotImplemented(mutations.RECEIVE_UPDATE_ISSUE_SUCCESS); +}); + +describe('RECEIVE_UPDATE_ISSUE_ERROR', () => { + expectNotImplemented(mutations.RECEIVE_UPDATE_ISSUE_ERROR); +}); + +describe('SET_CURRENT_PAGE', () => { + expectNotImplemented(mutations.SET_CURRENT_PAGE); +}); + +describe('TOGGLE_EMPTY_STATE', () => { + expectNotImplemented(mutations.TOGGLE_EMPTY_STATE); +}); diff --git a/spec/frontend/boards/stores/state_spec.js b/spec/frontend/boards/stores/state_spec.js new file mode 100644 index 00000000000..35490a63567 --- /dev/null +++ b/spec/frontend/boards/stores/state_spec.js @@ -0,0 +1,11 @@ +import createState from '~/boards/stores/state'; + +describe('createState', () => { + it('is a function', () => { + expect(createState).toEqual(expect.any(Function)); + }); + + it('returns an object', () => { + expect(createState()).toEqual(expect.any(Object)); + }); +}); |