Commit 59e95a71 authored by Jacob Schatz's avatar Jacob Schatz
Browse files

Merge branch 'close-issue-bug' into 'master'

Fix data check in update issue response



See merge request !3548
......@@ -34,7 +34,7 @@
issueStatus = if isClose then 'close' else 'open'
new Flash(issueFailMessage, 'alert')
success: (data, textStatus, jqXHR) ->
if data.saved
if 'id' of data
$(document).trigger('issuable:change');
if isClose
$('a.btn-close').addClass('hidden')
......
......@@ -29,8 +29,8 @@
spyOn(jQuery, 'ajax').and.callFake (req) ->
expect(req.type).toBe('PUT')
expect(req.url).toBe('http://gitlab.com/issues/6/close')
req.success saved: true
req.success id: 34
$btnClose = $('a.btn-close')
$btnReopen = $('a.btn-reopen')
expect($btnReopen).toBeHidden()
......@@ -94,7 +94,7 @@
spyOn(jQuery, 'ajax').and.callFake (req) ->
expect(req.type).toBe('PUT')
expect(req.url).toBe('http://gitlab.com/issues/6/reopen')
req.success saved: true
req.success id: 34
$btnClose = $('a.btn-close')
$btnReopen = $('a.btn-reopen')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment