Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
8f6ca700
Commit
8f6ca700
authored
Jan 07, 2016
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes ajax issue with issue spec
parent
0d59e7b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
Gemfile.lock
Gemfile.lock
+6
-6
spec/javascripts/issue_spec.js.coffee
spec/javascripts/issue_spec.js.coffee
+16
-16
No files found.
Gemfile.lock
View file @
8f6ca700
...
...
@@ -443,6 +443,10 @@ GEM
omniauth (1.2.2)
hashie (>= 1.2, < 4)
rack (~> 1.0)
omniauth-azure-oauth2 (0.0.6)
jwt (~> 1.0)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-bitbucket (0.0.2)
multi_json (~> 1.7)
omniauth (~> 1.1)
...
...
@@ -488,10 +492,6 @@ GEM
activesupport
nokogiri (>= 1.4.4)
omniauth (~> 1.0)
omniauth-azure-oauth2 (0.0.6)
jwt (~> 1.0)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
opennebula (4.14.2)
json
nokogiri
...
...
@@ -920,6 +920,7 @@ DEPENDENCIES
oauth2 (~> 1.0.0)
octokit (~> 3.7.0)
omniauth (~> 1.2.2)
omniauth-azure-oauth2
omniauth-bitbucket (~> 0.0.2)
omniauth-cas3 (~> 1.1.2)
omniauth-facebook (~> 3.0.0)
...
...
@@ -931,7 +932,6 @@ DEPENDENCIES
omniauth-shibboleth (~> 1.2.0)
omniauth-twitter (~> 1.2.0)
omniauth_crowd
omniauth-azure-oauth2
org-ruby (~> 0.9.12)
paranoia (~> 2.0)
pg (~> 0.18.2)
...
...
@@ -999,4 +999,4 @@ DEPENDENCIES
wikicloth (= 0.8.1)
BUNDLED WITH
1.1
0.6
1.1
1.2
spec/javascripts/issue_spec.js.coffee
View file @
8f6ca700
...
...
@@ -26,10 +26,10 @@ describe 'reopen/close issue', ->
fixture
.
load
(
'issues_show.html'
)
@
issue
=
new
Issue
()
it
'closes an issue'
,
->
$
.
ajax
=
(
obj
)
->
expect
(
obj
.
type
).
toBe
(
'PUT'
)
expect
(
obj
.
url
).
toBe
(
'http://gitlab.com/issues/6/close'
)
obj
.
success
saved
:
true
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
$btnClose
=
$
(
'a.btn-close'
)
$btnReopen
=
$
(
'a.btn-reopen'
)
...
...
@@ -46,10 +46,10 @@ describe 'reopen/close issue', ->
it
'fails to closes an issue with success:false'
,
->
$
.
ajax
=
(
obj
)
->
expect
(
obj
.
type
).
toBe
(
'PUT'
)
expect
(
obj
.
url
).
toBe
(
'http://goesnowhere.nothing/whereami'
)
obj
.
success
saved
:
false
spyOn
(
jQuery
,
'ajax'
).
and
.
callFake
(
req
)
->
expect
(
req
.
type
).
toBe
(
'PUT'
)
expect
(
req
.
url
).
toBe
(
'http://goesnowhere.nothing/whereami'
)
req
.
success
saved
:
false
$btnClose
=
$
(
'a.btn-close'
)
$btnReopen
=
$
(
'a.btn-reopen'
)
...
...
@@ -69,10 +69,10 @@ describe 'reopen/close issue', ->
it
'fails to closes an issue with HTTP error'
,
->
$
.
ajax
=
(
obj
)
->
expect
(
obj
.
type
).
toBe
(
'PUT'
)
expect
(
obj
.
url
).
toBe
(
'http://goesnowhere.nothing/whereami'
)
obj
.
error
()
spyOn
(
jQuery
,
'ajax'
).
and
.
callFake
(
req
)
->
expect
(
req
.
type
).
toBe
(
'PUT'
)
expect
(
req
.
url
).
toBe
(
'http://goesnowhere.nothing/whereami'
)
req
.
error
()
$btnClose
=
$
(
'a.btn-close'
)
$btnReopen
=
$
(
'a.btn-reopen'
)
...
...
@@ -91,10 +91,10 @@ describe 'reopen/close issue', ->
expect
(
$
(
'div.flash-alert'
).
text
()).
toBe
(
'Unable to update this issue at this time.'
)
it
'reopens an issue'
,
->
$
.
ajax
=
(
obj
)
->
expect
(
obj
.
type
).
toBe
(
'PUT'
)
expect
(
obj
.
url
).
toBe
(
'http://gitlab.com/issues/6/reopen'
)
obj
.
success
saved
:
true
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
$btnClose
=
$
(
'a.btn-close'
)
$btnReopen
=
$
(
'a.btn-reopen'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment