]> git.openstreetmap.org Git - rails.git/blob - test/controllers/errors_controller_test.rb
Merge branch 'master' into tag-colour-preview-rebase
[rails.git] / test / controllers / errors_controller_test.rb
1 require "test_helper"
2
3 class ErrorsControllerTest < ActionController::TestCase
4   def test_routes
5     assert_routing(
6       { :path => "/403", :method => :get },
7       { :controller => "errors", :action => "forbidden" }
8     )
9     assert_routing(
10       { :path => "/404", :method => :get },
11       { :controller => "errors", :action => "not_found" }
12     )
13     assert_routing(
14       { :path => "/500", :method => :get },
15       { :controller => "errors", :action => "internal_server_error" }
16     )
17   end
18
19   def test_forbidden
20     get :forbidden
21     assert_response :forbidden
22   end
23
24   def test_not_found
25     get :not_found
26     assert_response :not_found
27   end
28
29   def test_internal_server_error
30     get :internal_server_error
31     assert_response :internal_server_error
32   end
33 end