diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-04-30 17:26:03 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-04-30 17:26:03 -0500 |
commit | 00d1a57e9f99a1b2439281cb741fd82ef47a5c55 (patch) | |
tree | 3fafedd0ef5870df4c8d603aab7dadf3f833a977 /actionpack/test/controller | |
parent | 64e66cf161ee8db0bdbccb1be18fb760f5a9d24e (diff) | |
download | rails-00d1a57e9f99a1b2439281cb741fd82ef47a5c55.tar.gz rails-00d1a57e9f99a1b2439281cb741fd82ef47a5c55.tar.bz2 rails-00d1a57e9f99a1b2439281cb741fd82ef47a5c55.zip |
Start moving TestRequest and TestResponse into ActionDispatch
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/action_pack_assertions_test.rb | 22 | ||||
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 8 | ||||
-rw-r--r-- | actionpack/test/controller/test_test.rb | 4 |
4 files changed, 21 insertions, 15 deletions
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb index dd59999a0c..711640f9a9 100644 --- a/actionpack/test/controller/action_pack_assertions_test.rb +++ b/actionpack/test/controller/action_pack_assertions_test.rb @@ -305,24 +305,30 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase # check the empty flashing def test_flash_me_naked process :flash_me_naked - assert !@response.has_flash? - assert !@response.has_flash_with_contents? + assert_deprecated do + assert !@response.has_flash? + assert !@response.has_flash_with_contents? + end end # check if we have flash objects def test_flash_haves process :flash_me - assert @response.has_flash? - assert @response.has_flash_with_contents? - assert @response.has_flash_object?('hello') + assert_deprecated do + assert @response.has_flash? + assert @response.has_flash_with_contents? + assert @response.has_flash_object?('hello') + end end # ensure we don't have flash objects def test_flash_have_nots process :nothing - assert !@response.has_flash? - assert !@response.has_flash_with_contents? - assert_nil @response.flash['hello'] + assert_deprecated do + assert !@response.has_flash? + assert !@response.has_flash_with_contents? + assert_nil @response.flash['hello'] + end end # check if we were rendered by a file-based template? diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index b61a58dd09..df1a1b7683 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -345,7 +345,7 @@ class ActionCacheTest < ActionController::TestCase cached_time = content_to_cache reset! - @request.set_REQUEST_URI "/action_caching_test/expire.xml" + @request.request_uri = "/action_caching_test/expire.xml" get :expire, :format => :xml reset! diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index ef56119751..77abb68f32 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -1923,7 +1923,7 @@ class RouteSetTest < Test::Unit::TestCase end end - request.path = "/people" + request.request_uri = "/people" request.env["REQUEST_METHOD"] = "GET" assert_nothing_raised { set.recognize(request) } assert_equal("index", request.path_parameters[:action]) @@ -1945,7 +1945,7 @@ class RouteSetTest < Test::Unit::TestCase } request.recycle! - request.path = "/people/5" + request.request_uri = "/people/5" request.env["REQUEST_METHOD"] = "GET" assert_nothing_raised { set.recognize(request) } assert_equal("show", request.path_parameters[:action]) @@ -2047,7 +2047,7 @@ class RouteSetTest < Test::Unit::TestCase end end - request.path = "/people/5" + request.request_uri = "/people/5" request.env["REQUEST_METHOD"] = "GET" assert_nothing_raised { set.recognize(request) } assert_equal("show", request.path_parameters[:action]) @@ -2059,7 +2059,7 @@ class RouteSetTest < Test::Unit::TestCase assert_equal("update", request.path_parameters[:action]) request.recycle! - request.path = "/people/5.png" + request.request_uri = "/people/5.png" request.env["REQUEST_METHOD"] = "GET" assert_nothing_raised { set.recognize(request) } assert_equal("show", request.path_parameters[:action]) diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index b372980242..919f9815ec 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -201,7 +201,7 @@ XML end def test_process_with_request_uri_with_params_with_explicit_uri - @request.set_REQUEST_URI "/explicit/uri" + @request.request_uri = "/explicit/uri" process :test_uri, :id => 7 assert_equal "/explicit/uri", @response.body end @@ -212,7 +212,7 @@ XML end def test_process_with_query_string_with_explicit_uri - @request.set_REQUEST_URI "/explicit/uri?q=test?extra=question" + @request.request_uri = "/explicit/uri?q=test?extra=question" process :test_query_string assert_equal "q=test?extra=question", @response.body end |