diff options
Diffstat (limited to 'spec/frontend/projects/commit/store/mutations_spec.js')
-rw-r--r-- | spec/frontend/projects/commit/store/mutations_spec.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/frontend/projects/commit/store/mutations_spec.js b/spec/frontend/projects/commit/store/mutations_spec.js index 2ea50e71772..8989e769772 100644 --- a/spec/frontend/projects/commit/store/mutations_spec.js +++ b/spec/frontend/projects/commit/store/mutations_spec.js @@ -35,6 +35,16 @@ describe('Commit form modal mutations', () => { }); }); + describe('SET_BRANCHES_ENDPOINT', () => { + it('should set branchesEndpoint', () => { + stateCopy = { branchesEndpoint: 'endpoint/1' }; + + mutations[types.SET_BRANCHES_ENDPOINT](stateCopy, 'endpoint/2'); + + expect(stateCopy.branchesEndpoint).toBe('endpoint/2'); + }); + }); + describe('SET_BRANCH', () => { it('should set branch', () => { stateCopy = { branch: '_master_' }; @@ -54,4 +64,14 @@ describe('Commit form modal mutations', () => { expect(stateCopy.selectedBranch).toBe('_changed_branch_'); }); }); + + describe('SET_SELECTED_PROJECT', () => { + it('should set targetProjectId', () => { + stateCopy = { targetProjectId: '_project_1_' }; + + mutations[types.SET_SELECTED_PROJECT](stateCopy, '_project_2_'); + + expect(stateCopy.targetProjectId).toBe('_project_2_'); + }); + }); }); |