Add basic tests for the directions controller
This commit is contained in:
parent
4179fbbbeb
commit
4cef51bcbe
1 changed files with 21 additions and 0 deletions
21
test/controllers/directions_controller_test.rb
Normal file
21
test/controllers/directions_controller_test.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue