diff options
-rw-r--r-- | actionpack/test/controller/new_render_test.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb index fa27a1794b..3fade1c7b8 100644 --- a/actionpack/test/controller/new_render_test.rb +++ b/actionpack/test/controller/new_render_test.rb @@ -1,6 +1,10 @@ require File.dirname(__FILE__) + '/../abstract_unit' -silence_warnings { Customer = Struct.new(:name, :id) } +class Customer < Struct.new(:name, :id) + def to_param + id.to_s + end +end class CustomersController < ActionController::Base end @@ -780,8 +784,8 @@ EOS map.resources :customers map.connect ':controller/:action/:id' end - + get :render_with_object_location - assert_equal "http://test.host/customers/1", @response.headers["Location"] + assert_equal "http://www.nextangle.com/customers/1", @response.headers["Location"] end -end
\ No newline at end of file +end |