diff options
author | Phil Hughes <me@iamphill.com> | 2019-04-11 11:54:20 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-04-11 11:54:20 +0300 |
commit | 1d04ae7458bec082a2f82d0776f89e297719f23c (patch) | |
tree | 97d873cf0e6a244a8f1bf7cbc24a06b3b72dc43f /spec/frontend/ide | |
parent | 6a2e10e38ba87678b6b44fa73786eb1f4a668a4e (diff) |
Fixes Web IDE not loading merge request files
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60243
Diffstat (limited to 'spec/frontend/ide')
-rw-r--r-- | spec/frontend/ide/stores/mutations/merge_request_spec.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/frontend/ide/stores/mutations/merge_request_spec.js b/spec/frontend/ide/stores/mutations/merge_request_spec.js index e30ca22022f..afbe6770c0d 100644 --- a/spec/frontend/ide/stores/mutations/merge_request_spec.js +++ b/spec/frontend/ide/stores/mutations/merge_request_spec.js @@ -32,6 +32,24 @@ describe('IDE store merge request mutations', () => { expect(newMr.title).toBe('mr'); expect(newMr.active).toBeTruthy(); }); + + it('keeps original data', () => { + const versions = ['change']; + const mergeRequest = localState.projects.abcproject.mergeRequests[1]; + + mergeRequest.versions = versions; + + mutations.SET_MERGE_REQUEST(localState, { + projectPath: 'abcproject', + mergeRequestId: 1, + mergeRequest: { + title: ['change'], + }, + }); + + expect(mergeRequest.title).toBe('mr'); + expect(mergeRequest.versions).toEqual(versions); + }); }); describe('SET_MERGE_REQUEST_CHANGES', () => { |