X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/420a7289a0b08eee091f6650c2e83166df3fbe69..0579ff6e741b7b977840cc51c3c09b408119b069:/test/controllers/errors_controller_test.rb diff --git a/test/controllers/errors_controller_test.rb b/test/controllers/errors_controller_test.rb index 01b07efc8..253cbbdc0 100644 --- a/test/controllers/errors_controller_test.rb +++ b/test/controllers/errors_controller_test.rb @@ -1,7 +1,11 @@ require "test_helper" -class ErrorsControllerTest < ActionController::TestCase +class ErrorsControllerTest < ActionDispatch::IntegrationTest def test_routes + assert_routing( + { :path => "/400", :method => :get }, + { :controller => "errors", :action => "bad_request" } + ) assert_routing( { :path => "/403", :method => :get }, { :controller => "errors", :action => "forbidden" } @@ -16,18 +20,23 @@ class ErrorsControllerTest < ActionController::TestCase ) end + def test_bad_request + get "/400" + assert_response :bad_request + end + def test_forbidden - get :forbidden + get "/403" assert_response :forbidden end def test_not_found - get :not_found + get "/404" assert_response :not_found end def test_internal_server_error - get :internal_server_error + get "/500" assert_response :internal_server_error end end