Commit 476cba6f authored by Grzegorz Bizon's avatar Grzegorz Bizon

Minor improvements to CI_API_V4_URL variable exposure

parent 5e99a077
--- ---
title: Expose CI/CD predefined variable title: Expose CI/CD predefined variable `CI_API_V4_URL`
merge_request: 23936 merge_request: 23936
author: author:
type: added type: added
...@@ -18,7 +18,7 @@ module API ...@@ -18,7 +18,7 @@ module API
end end
def root_url def root_url
expose_url(root_path) @root_url ||= expose_url(root_path)
end end
def to_s def to_s
......
...@@ -3504,7 +3504,7 @@ describe Project do ...@@ -3504,7 +3504,7 @@ describe Project do
expect(project.api_variables.first[:value]).to include '/api/v4' expect(project.api_variables.first[:value]).to include '/api/v4'
end end
it 'contains an URL variable for every supported API version' do it 'contains a URL variable for every supported API version' do
supported_versions = API::API.versions.select do |version| supported_versions = API::API.versions.select do |version|
API::API.routes.select { |route| route.version == version }.many? API::API.routes.select { |route| route.version == version }.many?
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment