diff options
author | Rémy Coutable <remy@rymai.me> | 2017-02-06 11:28:48 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-02-06 11:28:48 +0000 |
commit | dcf9af6c1258b438d91727e824589e52e43d344c (patch) | |
tree | 631f7985ee9324f9671ca16ec64edbe87f688805 /spec/support | |
parent | da359c46b598ba44cff1829ab4abe49c4c225ae2 (diff) | |
parent | cdd2346d45f31482371520748289fcab4c423297 (diff) | |
download | gitlab-ce-dcf9af6c1258b438d91727e824589e52e43d344c.tar.gz |
Merge branch '22007-unify-projects-search' into 'master'
Unify projects search by removing /projects/:search endpoint
Closes #22007
See merge request !8877
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/api_helpers.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/support/api_helpers.rb b/spec/support/api_helpers.rb index 68b196d9033..ae6e708cf87 100644 --- a/spec/support/api_helpers.rb +++ b/spec/support/api_helpers.rb @@ -17,8 +17,8 @@ module ApiHelpers # => "/api/v2/issues?foo=bar&private_token=..." # # Returns the relative path to the requested API resource - def api(path, user = nil) - "/api/#{API::API.version}#{path}" + + def api(path, user = nil, version: API::API.version) + "/api/#{version}#{path}" + # Normalize query string (path.index('?') ? '' : '?') + @@ -31,6 +31,11 @@ module ApiHelpers end end + # Temporary helper method for simplifying V3 exclusive API specs + def v3_api(path, user = nil) + api(path, user, version: 'v3') + end + def ci_api(path, user = nil) "/ci/api/v1/#{path}" + |