summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Slaughter <pslaughter@gitlab.com>2019-08-22 15:20:51 -0500
committerPaul Slaughter <pslaughter@gitlab.com>2019-08-22 15:20:51 -0500
commitb23b2e0b1fd019eb4418c2bbfbc5a46e10e4932c (patch)
treed99e3bdb556e00383dbadd4c388ffe4ebf8fc8cd
parent6076fc80440c833229b38dc90b2d13e451419f2c (diff)
downloadgitlab-ce-51470-webide-default-commit.tar.gz
Deep clone proj mock data in spec51470-webide-default-commit
**Why?** Otherwise, we'd be mutating the shared object's `branches` prop.
-rw-r--r--spec/javascripts/ide/components/commit_sidebar/new_merge_request_option_spec.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/javascripts/ide/components/commit_sidebar/new_merge_request_option_spec.js b/spec/javascripts/ide/components/commit_sidebar/new_merge_request_option_spec.js
index 581e8421920..5f2db695241 100644
--- a/spec/javascripts/ide/components/commit_sidebar/new_merge_request_option_spec.js
+++ b/spec/javascripts/ide/components/commit_sidebar/new_merge_request_option_spec.js
@@ -27,7 +27,7 @@ describe('create new MR checkbox', () => {
vm.$store.state.currentBranchId = currentBranchId;
vm.$store.state.currentProjectId = 'abcproject';
- const proj = Object.assign({}, { ...projectData });
+ const proj = JSON.parse(JSON.stringify(projectData));
proj.branches[currentBranchId] = branches.find(branch => branch.name === currentBranchId);
Vue.set(vm.$store.state.projects, 'abcproject', proj);