From: Richard Fairhurst Date: Sat, 7 Feb 2015 12:34:38 +0000 (+0000) Subject: Merge pull request #35 from tomhughes/routing X-Git-Tag: live~4261^2~1 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/38b9f8f7927f09b32a94df87d1264f568f620480?hp=4179fbbbeb3fa063e912e09d3ebfb4d011d770c2 Merge pull request #35 from tomhughes/routing Add basic tests for the directions controller --- diff --git a/test/controllers/directions_controller_test.rb b/test/controllers/directions_controller_test.rb new file mode 100644 index 000000000..f24c9d205 --- /dev/null +++ b/test/controllers/directions_controller_test.rb @@ -0,0 +1,21 @@ +require 'test_helper' + +class DirectionsControllerTest < ActionController::TestCase + + ## + # test all routes which lead to this controller + def test_routes + assert_routing( + { :path => "/directions", :method => :get }, + { :controller => "directions", :action => "search" } + ) + end + + ### + # test the search action + def test_search + get :search + assert_response :success + end + +end