From 4cef51bcbe4f0c7cbb8f2a47b88fc7d3db7526e0 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 7 Feb 2015 12:02:42 +0000 Subject: [PATCH 1/1] Add basic tests for the directions controller --- .../controllers/directions_controller_test.rb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/controllers/directions_controller_test.rb 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 -- 2.43.2