Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4907

Show
Ignore:
Timestamp:
09/02/06 20:41:40 (2 years ago)
Author:
rick
Message:

Add routing tests to assert that RoutingError is raised when conditions aren't met. Closes #6016 [Nathan Witmer]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r4898 r4907  
    11*SVN* 
     2 
     3* Add routing tests to assert that RoutingError is raised when conditions aren't met.  Closes #6016 [Nathan Witmer] 
    24 
    35* Deprecation: update docs. #5998 [jakob@mentalized.net, Kevin Clark] 
  • trunk/actionpack/test/controller/routing_test.rb

    r4805 r4907  
    13821382    assert_nothing_raised { set.recognize(request) } 
    13831383    assert_equal("create", request.path_parameters[:action]) 
     1384     
     1385    request.method = :put 
     1386    assert_nothing_raised { set.recognize(request) } 
     1387    assert_equal("update", request.path_parameters[:action]) 
     1388 
     1389    request.method = :update 
     1390    assert_raises(ActionController::RoutingError) { set.recognize(request) } 
    13841391 
    13851392    request.path = "/people/5" 
     
    13981405    assert_equal("destroy", request.path_parameters[:action]) 
    13991406    assert_equal("5", request.path_parameters[:id]) 
     1407     
     1408    request.method = :post 
     1409    assert_raises(ActionController::RoutingError) { set.recognize(request) } 
     1410     
    14001411  ensure 
    14011412    Object.send(:remove_const, :PeopleController)