Commit aacda082 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ajax-issues-fix' into 'master'

fixes ajax issue with issue spec



See merge request !2333
parents 0d59e7b9 8f6ca700
...@@ -443,6 +443,10 @@ GEM ...@@ -443,6 +443,10 @@ GEM
omniauth (1.2.2) omniauth (1.2.2)
hashie (>= 1.2, < 4) hashie (>= 1.2, < 4)
rack (~> 1.0) rack (~> 1.0)
omniauth-azure-oauth2 (0.0.6)
jwt (~> 1.0)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-bitbucket (0.0.2) omniauth-bitbucket (0.0.2)
multi_json (~> 1.7) multi_json (~> 1.7)
omniauth (~> 1.1) omniauth (~> 1.1)
...@@ -488,10 +492,6 @@ GEM ...@@ -488,10 +492,6 @@ GEM
activesupport activesupport
nokogiri (>= 1.4.4) nokogiri (>= 1.4.4)
omniauth (~> 1.0) omniauth (~> 1.0)
omniauth-azure-oauth2 (0.0.6)
jwt (~> 1.0)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
opennebula (4.14.2) opennebula (4.14.2)
json json
nokogiri nokogiri
...@@ -920,6 +920,7 @@ DEPENDENCIES ...@@ -920,6 +920,7 @@ DEPENDENCIES
oauth2 (~> 1.0.0) oauth2 (~> 1.0.0)
octokit (~> 3.7.0) octokit (~> 3.7.0)
omniauth (~> 1.2.2) omniauth (~> 1.2.2)
omniauth-azure-oauth2
omniauth-bitbucket (~> 0.0.2) omniauth-bitbucket (~> 0.0.2)
omniauth-cas3 (~> 1.1.2) omniauth-cas3 (~> 1.1.2)
omniauth-facebook (~> 3.0.0) omniauth-facebook (~> 3.0.0)
...@@ -931,7 +932,6 @@ DEPENDENCIES ...@@ -931,7 +932,6 @@ DEPENDENCIES
omniauth-shibboleth (~> 1.2.0) omniauth-shibboleth (~> 1.2.0)
omniauth-twitter (~> 1.2.0) omniauth-twitter (~> 1.2.0)
omniauth_crowd omniauth_crowd
omniauth-azure-oauth2
org-ruby (~> 0.9.12) org-ruby (~> 0.9.12)
paranoia (~> 2.0) paranoia (~> 2.0)
pg (~> 0.18.2) pg (~> 0.18.2)
...@@ -999,4 +999,4 @@ DEPENDENCIES ...@@ -999,4 +999,4 @@ DEPENDENCIES
wikicloth (= 0.8.1) wikicloth (= 0.8.1)
BUNDLED WITH BUNDLED WITH
1.10.6 1.11.2
...@@ -26,10 +26,10 @@ describe 'reopen/close issue', -> ...@@ -26,10 +26,10 @@ describe 'reopen/close issue', ->
fixture.load('issues_show.html') fixture.load('issues_show.html')
@issue = new Issue() @issue = new Issue()
it 'closes an issue', -> it 'closes an issue', ->
$.ajax = (obj) -> spyOn(jQuery, 'ajax').and.callFake (req) ->
expect(obj.type).toBe('PUT') expect(req.type).toBe('PUT')
expect(obj.url).toBe('http://gitlab.com/issues/6/close') expect(req.url).toBe('http://gitlab.com/issues/6/close')
obj.success saved: true req.success saved: true
$btnClose = $('a.btn-close') $btnClose = $('a.btn-close')
$btnReopen = $('a.btn-reopen') $btnReopen = $('a.btn-reopen')
...@@ -46,10 +46,10 @@ describe 'reopen/close issue', -> ...@@ -46,10 +46,10 @@ describe 'reopen/close issue', ->
it 'fails to closes an issue with success:false', -> it 'fails to closes an issue with success:false', ->
$.ajax = (obj) -> spyOn(jQuery, 'ajax').and.callFake (req) ->
expect(obj.type).toBe('PUT') expect(req.type).toBe('PUT')
expect(obj.url).toBe('http://goesnowhere.nothing/whereami') expect(req.url).toBe('http://goesnowhere.nothing/whereami')
obj.success saved: false req.success saved: false
$btnClose = $('a.btn-close') $btnClose = $('a.btn-close')
$btnReopen = $('a.btn-reopen') $btnReopen = $('a.btn-reopen')
...@@ -69,10 +69,10 @@ describe 'reopen/close issue', -> ...@@ -69,10 +69,10 @@ describe 'reopen/close issue', ->
it 'fails to closes an issue with HTTP error', -> it 'fails to closes an issue with HTTP error', ->
$.ajax = (obj) -> spyOn(jQuery, 'ajax').and.callFake (req) ->
expect(obj.type).toBe('PUT') expect(req.type).toBe('PUT')
expect(obj.url).toBe('http://goesnowhere.nothing/whereami') expect(req.url).toBe('http://goesnowhere.nothing/whereami')
obj.error() req.error()
$btnClose = $('a.btn-close') $btnClose = $('a.btn-close')
$btnReopen = $('a.btn-reopen') $btnReopen = $('a.btn-reopen')
...@@ -91,10 +91,10 @@ describe 'reopen/close issue', -> ...@@ -91,10 +91,10 @@ describe 'reopen/close issue', ->
expect($('div.flash-alert').text()).toBe('Unable to update this issue at this time.') expect($('div.flash-alert').text()).toBe('Unable to update this issue at this time.')
it 'reopens an issue', -> it 'reopens an issue', ->
$.ajax = (obj) -> spyOn(jQuery, 'ajax').and.callFake (req) ->
expect(obj.type).toBe('PUT') expect(req.type).toBe('PUT')
expect(obj.url).toBe('http://gitlab.com/issues/6/reopen') expect(req.url).toBe('http://gitlab.com/issues/6/reopen')
obj.success saved: true req.success saved: true
$btnClose = $('a.btn-close') $btnClose = $('a.btn-close')
$btnReopen = $('a.btn-reopen') $btnReopen = $('a.btn-reopen')
......
Markdown is supported
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