summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-11-02 09:50:01 +0000
committerPhil Hughes <me@iamphill.com>2017-11-10 16:55:58 +0000
commitf82af4bdcf19328d763aeb39d9d77a45c9cb9547 (patch)
treea1f307c9190aec13d2269f6994c869e7aa42572f /app/assets
parent8c65b76b6fa71337b3effa3a77cf5a5d0fa66bd0 (diff)
downloadgitlab-ce-f82af4bdcf19328d763aeb39d9d77a45c9cb9547.tar.gz
Added tests to multi-file Vuex store
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/repo/stores/actions/branch.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/repo/stores/actions/branch.js b/app/assets/javascripts/repo/stores/actions/branch.js
index b81a70dfd1e..61d9a5af3e3 100644
--- a/app/assets/javascripts/repo/stores/actions/branch.js
+++ b/app/assets/javascripts/repo/stores/actions/branch.js
@@ -3,16 +3,16 @@ import * as types from '../mutation_types';
import { pushState } from '../utils';
// eslint-disable-next-line import/prefer-default-export
-export const createNewBranch = ({ rootState, commit }, branch) => service.createBranch(
- rootState.project.id,
+export const createNewBranch = ({ state, commit }, branch) => service.createBranch(
+ state.project.id,
{
branch,
- ref: rootState.currentBranch,
+ ref: state.currentBranch,
},
).then(res => res.json())
.then((data) => {
const branchName = data.name;
- const url = location.href.replace(rootState.currentBranch, branchName);
+ const url = location.href.replace(state.currentBranch, branchName);
pushState(url);