提交 f7bb3ddc 编写于 作者: J Jeremy Kemper

Fix render :location => ... test.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 e48b062e
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 @@ def test_rendering_with_object_location_should_set_header_with_url_for
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册