X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/b45642d2abca834c59e7db1fda512151393c88cc..bf4d8fc2d0e9fa8f828ff9a6b1dc7c6e0a41170b:/test/controllers/api/versions_controller_test.rb diff --git a/test/controllers/api/versions_controller_test.rb b/test/controllers/api/versions_controller_test.rb index 1c70831c9..d2b353a8e 100644 --- a/test/controllers/api/versions_controller_test.rb +++ b/test/controllers/api/versions_controller_test.rb @@ -46,5 +46,17 @@ module Api assert_response :success assert_select "osm[version]", :count => 0 end + + def test_versions_available_while_offline + with_settings(:status => "api_offline") do + get api_versions_path + assert_response :success + assert_select "osm[generator='#{Settings.generator}']", :count => 1 do + assert_select "api", :count => 1 do + assert_select "version", Settings.api_version + end + end + end + end end end