Revision d4449f45
Added by Tomer Brisker over 6 years ago
test/integration/api_routing_test.rb | ||
---|---|---|
require 'integration_test_helper'
|
||
|
||
class RoutingIntegrationTest < ActionDispatch::IntegrationTest
|
||
test "should go to v1 controller for /v1/ passed in URL" do
|
||
assert_recognizes({:controller => "api/v1/domains", :action => "index", :apiv => "v1", :format => "json"}, "/api/v1/domains")
|
||
end
|
||
|
||
test "should go to v2 controller for /v2 passed in URL" do
|
||
assert_recognizes({:controller => "api/v2/domains", :action => "index", :apiv => "v2", :format => "json"}, "/api/v2/domains")
|
||
end
|
Also available in: Unified diff
Fixes #11389 - Remove API v1
API v1 has been deprecated since Foreman 1.9 - over 2 years ago.
This is more then enough time for anyone needing to migrate to v2.
Even though the original issue requests extraction to a plugin, I do not
see any point in investing the time and effort to maintain a long
deprecated API.