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
Jérome Perrin
gitlab-ce
Commits
52afe463
Commit
52afe463
authored
Jan 13, 2017
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only escape the 'No Milestone' param
This is less invasive than the parent commit.
parent
b0ae433e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
spec/requests/api/issues_spec.rb
spec/requests/api/issues_spec.rb
+5
-3
spec/support/api_helpers.rb
spec/support/api_helpers.rb
+1
-1
No files found.
spec/requests/api/issues_spec.rb
View file @
52afe463
...
...
@@ -50,6 +50,8 @@ describe API::Issues, api: true do
end
let!
(
:note
)
{
create
(
:note_on_issue
,
author:
user
,
project:
project
,
noteable:
issue
)
}
let
(
:no_milestone_title
)
{
URI
.
escape
(
Milestone
::
None
.
title
)
}
before
do
project
.
team
<<
[
user
,
:reporter
]
project
.
team
<<
[
guest
,
:guest
]
...
...
@@ -174,7 +176,7 @@ describe API::Issues, api: true do
end
it
'returns an array of issues with no milestone'
do
get
api
(
"/issues?milestone=
#{
Milestone
::
None
.
title
}
"
,
author
)
get
api
(
"/issues?milestone=
#{
no_milestone_
title
}
"
,
author
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
).
to
be_an
Array
...
...
@@ -365,7 +367,7 @@ describe API::Issues, api: true do
end
it
'returns an array of issues with no milestone'
do
get
api
(
"
#{
base_url
}
?milestone=
#{
Milestone
::
None
.
title
}
"
,
user
)
get
api
(
"
#{
base_url
}
?milestone=
#{
no_milestone_
title
}
"
,
user
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
).
to
be_an
Array
...
...
@@ -537,7 +539,7 @@ describe API::Issues, api: true do
end
it
'returns an array of issues with no milestone'
do
get
api
(
"
#{
base_url
}
/issues?milestone=
#{
Milestone
::
None
.
title
}
"
,
user
)
get
api
(
"
#{
base_url
}
/issues?milestone=
#{
no_milestone_
title
}
"
,
user
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
).
to
be_an
Array
...
...
spec/support/api_helpers.rb
View file @
52afe463
...
...
@@ -18,7 +18,7 @@ module ApiHelpers
#
# Returns the relative path to the requested API resource
def
api
(
path
,
user
=
nil
)
"/api/
#{
API
::
API
.
version
}#{
URI
.
escape
(
path
)
}
"
+
"/api/
#{
API
::
API
.
version
}#{
path
}
"
+
# Normalize query string
(
path
.
index
(
'?'
)
?
''
:
'?'
)
+
...
...
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