Move the capabilities call out of api_controller
This commit is contained in:
parent
d74dd80540
commit
6a4092bc16
7 changed files with 63 additions and 40 deletions
|
@ -18,14 +18,6 @@ class ApiControllerTest < ActionController::TestCase
|
|||
##
|
||||
# test all routes which lead to this controller
|
||||
def test_routes
|
||||
assert_routing(
|
||||
{ :path => "/api/capabilities", :method => :get },
|
||||
{ :controller => "api", :action => "capabilities" }
|
||||
)
|
||||
assert_recognizes(
|
||||
{ :controller => "api", :action => "capabilities" },
|
||||
{ :path => "/api/0.6/capabilities", :method => :get }
|
||||
)
|
||||
assert_routing(
|
||||
{ :path => "/api/0.6/permissions", :method => :get },
|
||||
{ :controller => "api", :action => "permissions" }
|
||||
|
@ -379,23 +371,6 @@ class ApiControllerTest < ActionController::TestCase
|
|||
assert_response :success
|
||||
end
|
||||
|
||||
def test_capabilities
|
||||
get :capabilities
|
||||
assert_response :success
|
||||
assert_select "osm[version='#{API_VERSION}'][generator='#{GENERATOR}']", :count => 1 do
|
||||
assert_select "api", :count => 1 do
|
||||
assert_select "version[minimum='#{API_VERSION}'][maximum='#{API_VERSION}']", :count => 1
|
||||
assert_select "area[maximum='#{MAX_REQUEST_AREA}']", :count => 1
|
||||
assert_select "note_area[maximum='#{MAX_NOTE_REQUEST_AREA}']", :count => 1
|
||||
assert_select "tracepoints[per_page='#{TRACEPOINTS_PER_PAGE}']", :count => 1
|
||||
assert_select "changesets[maximum_elements='#{Changeset::MAX_ELEMENTS}']", :count => 1
|
||||
assert_select "status[database='online']", :count => 1
|
||||
assert_select "status[api='online']", :count => 1
|
||||
assert_select "status[gpx='online']", :count => 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def test_permissions_anonymous
|
||||
get :permissions
|
||||
assert_response :success
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue