Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/diffs/store/mutations_spec.js')
-rw-r--r--spec/frontend/diffs/store/mutations_spec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/diffs/store/mutations_spec.js b/spec/frontend/diffs/store/mutations_spec.js
index fdcf7c3eeab..a5be41aa69f 100644
--- a/spec/frontend/diffs/store/mutations_spec.js
+++ b/spec/frontend/diffs/store/mutations_spec.js
@@ -1045,6 +1045,17 @@ describe('DiffsStoreMutations', () => {
});
});
+ describe('SET_FILE_COMMENT_FORM', () => {
+ it('toggles diff files hasCommentForm', () => {
+ const state = { diffFiles: [{ file_path: 'path', hasCommentForm: false }] };
+ const expanded = true;
+
+ mutations[types.SET_FILE_COMMENT_FORM](state, { filePath: 'path', expanded });
+
+ expect(state.diffFiles[0].hasCommentForm).toEqual(expanded);
+ });
+ });
+
describe('ADD_DRAFT_TO_FILE', () => {
it('adds draft to diff file', () => {
const state = { diffFiles: [{ file_path: 'path', drafts: [] }] };