From: Tom Hughes Date: Sat, 7 Feb 2015 12:02:42 +0000 (+0000) Subject: Add basic tests for the directions controller X-Git-Tag: live~4285^2~1^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/4cef51bcbe4f0c7cbb8f2a47b88fc7d3db7526e0?hp=4179fbbbeb3fa063e912e09d3ebfb4d011d770c2 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