summaryrefslogtreecommitdiff
path: root/spec/frontend/whats_new/store/mutations_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/whats_new/store/mutations_spec.js')
-rw-r--r--spec/frontend/whats_new/store/mutations_spec.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/frontend/whats_new/store/mutations_spec.js b/spec/frontend/whats_new/store/mutations_spec.js
new file mode 100644
index 00000000000..3c33364fed3
--- /dev/null
+++ b/spec/frontend/whats_new/store/mutations_spec.js
@@ -0,0 +1,25 @@
+import mutations from '~/whats_new/store/mutations';
+import createState from '~/whats_new/store/state';
+import * as types from '~/whats_new/store/mutation_types';
+
+describe('whats new mutations', () => {
+ let state;
+
+ beforeEach(() => {
+ state = createState;
+ });
+
+ describe('openDrawer', () => {
+ it('sets open to true', () => {
+ mutations[types.OPEN_DRAWER](state);
+ expect(state.open).toBe(true);
+ });
+ });
+
+ describe('closeDrawer', () => {
+ it('sets open to false', () => {
+ mutations[types.CLOSE_DRAWER](state);
+ expect(state.open).toBe(false);
+ });
+ });
+});