]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/export_controller_test.rb
Add routing tests for all supported routes
[rails.git] / test / functional / export_controller_test.rb
index 0fa6398c16d0bd4aff69c220539740c284f59863..75ed34a4aa1d403fcaed7e506690eaeff79377a2 100644 (file)
@@ -1,7 +1,20 @@
 require File.dirname(__FILE__) + '/../test_helper'
 
 class ExportControllerTest < ActionController::TestCase
 require File.dirname(__FILE__) + '/../test_helper'
 
 class ExportControllerTest < ActionController::TestCase
-  # Replace this with your real tests.
+
+  ##
+  # test all routes which lead to this controller
+  def test_routes
+    assert_routing(
+      { :path => "/export/start", :method => :get },
+      { :controller => "export", :action => "start" }
+    )
+    assert_routing(
+      { :path => "/export/finish", :method => :post },
+      { :controller => "export", :action => "finish" }
+    )
+  end
+
   def test_start
     xhr :get, :start
     assert_response :success
   def test_start
     xhr :get, :start
     assert_response :success