diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2019-07-09 08:44:19 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-07-09 08:44:19 +0000 |
commit | b9e52612feb4956f0b3cc26af0f98810e67a5287 (patch) | |
tree | d9b851e9ef3e50cdb7e4ad181d5313666a17e0fe /spec/javascripts/notes | |
parent | 9d079194652b94c7cf9d94b4c757ffa1fcdfbcf1 (diff) | |
download | gitlab-ce-b9e52612feb4956f0b3cc26af0f98810e67a5287.tar.gz |
Updates on success of an MR the count on top and in other tabs
New API endpoint for merge request count
Updates all open tabs at the same time with one call
Restructured API response
API response changed to 401 if no current_user
Added API + JS specs
Fix for Static Check
Updated Count on Open/Close, Assign/Unassign of MR's
Checking if MR Count is refreshed
Added # frozen_string_literal: true to spec
Added Changelog
Diffstat (limited to 'spec/javascripts/notes')
-rw-r--r-- | spec/javascripts/notes/components/comment_form_spec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/javascripts/notes/components/comment_form_spec.js b/spec/javascripts/notes/components/comment_form_spec.js index 362963ddaf4..88c86746992 100644 --- a/spec/javascripts/notes/components/comment_form_spec.js +++ b/spec/javascripts/notes/components/comment_form_spec.js @@ -251,6 +251,21 @@ describe('issue_comment_form component', () => { }); }); }); + + describe('when toggling state', () => { + it('should update MR count', done => { + spyOn(vm, 'closeIssue').and.returnValue(Promise.resolve()); + + const updateMrCountSpy = spyOnDependency(CommentForm, 'refreshUserMergeRequestCounts'); + vm.toggleIssueState(); + + Vue.nextTick(() => { + expect(updateMrCountSpy).toHaveBeenCalled(); + + done(); + }); + }); + }); }); describe('issue is confidential', () => { |