summaryrefslogtreecommitdiff
path: root/spec/frontend/ide/stores/modules/commit/mutations_spec.js
diff options
context:
space:
mode:
authorSam Bigelow <sbigelow@gitlab.com>2019-06-03 17:00:31 -0400
committerSam Bigelow <sbigelow@gitlab.com>2019-06-06 00:12:21 -0400
commitbf8ab1243356e5732ce1a07ea5fb3ea98549635d (patch)
tree4c8db8b586182f9e2efc5d69d191b2d55caadb63 /spec/frontend/ide/stores/modules/commit/mutations_spec.js
parent55920e074c2352e41394eca63d5b7fb03284e352 (diff)
downloadgitlab-ce-bf8ab1243356e5732ce1a07ea5fb3ea98549635d.tar.gz
Default MR checkbox to true in most cases60034-default-web-ide-s-merge-request-checkbox-to-true
- Pull the new MR option out into it's own component - Default MR checkbox to true when creating a new MR and committing to a branch that does not have an MR - Still change the MR checkbox to false when a user is on a branch that already has an MR - Hide MR option when on a branch that already has an MR and committing to current branch - Don't default to true when committing directly to master
Diffstat (limited to 'spec/frontend/ide/stores/modules/commit/mutations_spec.js')
-rw-r--r--spec/frontend/ide/stores/modules/commit/mutations_spec.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/frontend/ide/stores/modules/commit/mutations_spec.js b/spec/frontend/ide/stores/modules/commit/mutations_spec.js
index 40d47aaad03..246500a2f34 100644
--- a/spec/frontend/ide/stores/modules/commit/mutations_spec.js
+++ b/spec/frontend/ide/stores/modules/commit/mutations_spec.js
@@ -54,5 +54,20 @@ describe('IDE commit module mutations', () => {
expect(state.shouldCreateMR).toBe(false);
});
+
+ it('sets shouldCreateMR to given value when passed in', () => {
+ state.shouldCreateMR = false;
+ mutations.TOGGLE_SHOULD_CREATE_MR(state, false);
+
+ expect(state.shouldCreateMR).toBe(false);
+ });
+ });
+
+ describe('INTERACT_WITH_NEW_MR', () => {
+ it('sets interactedWithNewMR to true', () => {
+ mutations.INTERACT_WITH_NEW_MR(state);
+
+ expect(state.interactedWithNewMR).toBe(true);
+ });
});
});