]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/search_controller_test.rb
Localisation updates from http://translatewiki.net.
[rails.git] / test / functional / search_controller_test.rb
index a213253ecd62cb6e854be8f7d789bdd58e470006..7fd060dc4548c98c714dc46c63c581ccddd6d195 100644 (file)
@@ -1,8 +1,24 @@
 require File.dirname(__FILE__) + '/../test_helper'
 
 class SearchControllerTest < ActionController::TestCase
-  # Replace this with your real tests.
-  def test_truth
-    assert true
+  ##
+  # test all routes which lead to this controller
+  def test_routes
+    assert_routing(
+      { :path => "/api/0.6/search", :method => :get },
+      { :controller => "search", :action => "search_all" }
+    )
+    assert_routing(
+      { :path => "/api/0.6/nodes/search", :method => :get },
+      { :controller => "search", :action => "search_nodes" }
+    )
+    assert_routing(
+      { :path => "/api/0.6/ways/search", :method => :get },
+      { :controller => "search", :action => "search_ways" }
+    )
+    assert_routing(
+      { :path => "/api/0.6/relations/search", :method => :get },
+      { :controller => "search", :action => "search_relations" }
+    )
   end
 end