]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/versions_controller_test.rb
Merge remote-tracking branch 'upstream/pull/4889'
[rails.git] / test / controllers / api / versions_controller_test.rb
index 1c70831c93c9b65293cb107ac1f04b059f4fd90c..d2b353a8edfe5142f8697b099c0346eb39050590 100644 (file)
@@ -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