Changeset 1960
- Timestamp:
- 07/31/05 10:31:47 (3 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/test_process.rb (modified) (1 diff)
- trunk/actionpack/test/controller/test_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r1942 r1960 1 1 *SVN* 2 3 * Allow remote_addr to be queried on TestRequest #1668 2 4 3 5 * Fixed bug when a partial render was passing a local with the same name as the partial trunk/actionpack/lib/action_controller/test_process.rb
r1905 r1960 59 59 def remote_addr=(addr) 60 60 @env['REMOTE_ADDR'] = addr 61 end 62 63 def remote_addr 64 @env['REMOTE_ADDR'] 61 65 end 62 66 trunk/actionpack/test/controller/test_test.rb
r1874 r1960 38 38 39 39 def test_only_one_param 40 render :text => (@params[:left] && @params[:right]) ? "EEP, Both here!" : "OK" 40 render :text => (params[:left] && params[:right]) ? "EEP, Both here!" : "OK" 41 end 42 43 def test_remote_addr 44 render :text => (request.remote_addr || "not specified") 41 45 end 42 46 end … … 165 169 assert_equal routes_id, ActionController::Routing::Routes.object_id 166 170 end 171 172 def test_remote_addr 173 get :test_remote_addr 174 assert_equal "0.0.0.0", @response.body 175 176 @request.remote_addr = "192.0.0.1" 177 get :test_remote_addr 178 assert_equal "192.0.0.1", @response.body 179 end 167 180 end