summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-01-13 10:07:56 +0000
committerSean McGivern <sean@gitlab.com>2017-01-13 10:07:56 +0000
commit52afe463802ce37e6f551b05b38f70148171689a (patch)
tree5546341f17489fe0aaa348ccd29a8aac071ef818
parentb0ae433ef361f62cd95c40035855c31d3dca784d (diff)
downloadgitlab-ce-fix-ruby21-milestone-api-specs-2.tar.gz
Only escape the 'No Milestone' paramfix-ruby21-milestone-api-specs-2
This is less invasive than the parent commit.
-rw-r--r--spec/requests/api/issues_spec.rb8
-rw-r--r--spec/support/api_helpers.rb2
2 files changed, 6 insertions, 4 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb
index 432ba8f0f26..12dd4bd83f7 100644
--- a/spec/requests/api/issues_spec.rb
+++ b/spec/requests/api/issues_spec.rb
@@ -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
diff --git a/spec/support/api_helpers.rb b/spec/support/api_helpers.rb
index e25cb9ecd89..68b196d9033 100644
--- a/spec/support/api_helpers.rb
+++ b/spec/support/api_helpers.rb
@@ -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('?') ? '' : '?') +