Merge pull request #35 from tomhughes/routing

Add basic tests for the directions controller
This commit is contained in:
Richard Fairhurst 2015-02-07 12:34:38 +00:00
commit 38b9f8f792

View file

@ -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