Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-01-13 13:02:46 +0300
committerSean McGivern <sean@gitlab.com>2017-01-13 13:04:25 +0300
commitb0ae433ef361f62cd95c40035855c31d3dca784d (patch)
tree7f0b2b870be44c286cea0fe1718e24a3f6f1bfa5 /spec
parent17c42cb8a283780b489826e9efe3f900011c2eac (diff)
Fix milestone API specs in Ruby 2.1
Ruby 2.3: ``` URI.parse('http://foo/bar?baz quux') => #<URI::HTTP http://foo/bar?baz%20quux> ``` Ruby 2.1: ``` URI.parse('http://foo/bar?baz quux') URI::InvalidURIError: bad URI(is not URI?): http://foo/bar?baz quux ```
Diffstat (limited to 'spec')
-rw-r--r--spec/support/api_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/api_helpers.rb b/spec/support/api_helpers.rb
index 68b196d9033..e25cb9ecd89 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}#{path}" +
+ "/api/#{API::API.version}#{URI.escape(path)}" +
# Normalize query string
(path.index('?') ? '' : '?') +