diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-03-21 01:43:44 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-03-21 12:33:26 +0300 |
commit | 44455913ff189423685325f82f2b0e1b8dc67613 (patch) | |
tree | 19abc44bacd399d237586d6d32a980633df989e8 /spec | |
parent | 0b76f6551e57bed64ef6073526038aa67da041f6 (diff) |
Merge branch '29559-issue-count' into 'master'
handle commas in Issue total count
Closes #29559
See merge request !10028
Diffstat (limited to 'spec')
-rw-r--r-- | spec/javascripts/issue_spec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/javascripts/issue_spec.js b/spec/javascripts/issue_spec.js index e7530f61385..2dc8e158655 100644 --- a/spec/javascripts/issue_spec.js +++ b/spec/javascripts/issue_spec.js @@ -139,6 +139,21 @@ require('~/issue'); expectErrorMessage(); expect($('.issue_counter')).toHaveText(1); }); + + it('updates counter', () => { + spyOn(jQuery, 'ajax').and.callFake(function(req) { + expectPendingRequest(req, $btnClose); + req.success({ + id: 34 + }); + }); + + expect($('.issue_counter')).toHaveText(1); + $('.issue_counter').text('1,001'); + expect($('.issue_counter').text()).toEqual('1,001'); + $btnClose.trigger('click'); + expect($('.issue_counter').text()).toEqual('1,000'); + }); }); describe('reopen issue', function() { |