Add framework for parameter validation using rails_param gem
This commit is contained in:
parent
ba90fe97ea
commit
feff501b25
9 changed files with 70 additions and 0 deletions
|
@ -2,6 +2,10 @@ require "test_helper"
|
|||
|
||||
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,6 +20,11 @@ class ErrorsControllerTest < ActionDispatch::IntegrationTest
|
|||
)
|
||||
end
|
||||
|
||||
def test_bad_request
|
||||
get "/400"
|
||||
assert_response :bad_request
|
||||
end
|
||||
|
||||
def test_forbidden
|
||||
get "/403"
|
||||
assert_response :forbidden
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue