From 7034272354ad41dd4d1c90138a79e7f14ebc2bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 1 Aug 2009 16:47:44 +0200 Subject: Add destroyed? to ActiveRecord, include tests for polymorphic urls for destroyed objects and refactor mime responds tests and documentation. --- actionpack/test/controller/render_test.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'actionpack/test/controller/render_test.rb') 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 -- cgit v1.2.3