summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-01-13 10:02:46 +0000
committerSean McGivern <sean@gitlab.com>2017-01-13 10:04:25 +0000
commitb0ae433ef361f62cd95c40035855c31d3dca784d (patch)
tree7f0b2b870be44c286cea0fe1718e24a3f6f1bfa5 /spec
parent17c42cb8a283780b489826e9efe3f900011c2eac (diff)
downloadgitlab-ce-b0ae433ef361f62cd95c40035855c31d3dca784d.tar.gz
Fix milestone API specs in Ruby 2.1fix-ruby21-milestone-api-specs
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('?') ? '' : '?') +