diff options
author | José Valim <jose.valim@gmail.com> | 2009-08-01 16:47:44 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-08-07 17:16:16 +0200 |
commit | 7034272354ad41dd4d1c90138a79e7f14ebc2bed (patch) | |
tree | 51c091d7ff973bbeb1aa2bd7417d0da3a9ed71ba /actionpack/test/controller/render_test.rb | |
parent | f59984cc81bd1a64a53a2480a9b4e05fe7357d7c (diff) | |
download | rails-7034272354ad41dd4d1c90138a79e7f14ebc2bed.tar.gz rails-7034272354ad41dd4d1c90138a79e7f14ebc2bed.tar.bz2 rails-7034272354ad41dd4d1c90138a79e7f14ebc2bed.zip |
Add destroyed? to ActiveRecord, include tests for polymorphic urls for destroyed objects and refactor mime responds tests and documentation.
Diffstat (limited to 'actionpack/test/controller/render_test.rb')
-rw-r--r-- | actionpack/test/controller/render_test.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/test/controller/render_test.rb b/actionpack/test/controller/render_test.rb index f2cd6dbb85..9546fdb50d 100644 --- a/actionpack/test/controller/render_test.rb +++ b/actionpack/test/controller/render_test.rb @@ -459,7 +459,7 @@ class TestController < ActionController::Base end def head_with_location_object - head :location => Customer.new("david") + head :location => Customer.new("david", 1) end def head_with_symbolic_status @@ -622,9 +622,6 @@ class TestController < ActionController::Base end private - def customer_url(customer) - request.host + "/customers/1" - end def determine_layout case action_name @@ -1093,9 +1090,14 @@ class RenderTest < ActionController::TestCase end def test_head_with_location_object + ActionController::Routing::Routes.draw do |map| + map.resources :customers + map.connect ':controller/:action/:id' + end + get :head_with_location_object assert @response.body.blank? - assert_equal "www.nextangle.com/customers/1", @response.headers["Location"] + assert_equal "http://www.nextangle.com/customers/1", @response.headers["Location"] assert_response :ok end |