diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-27 23:48:28 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-27 23:48:28 +0000 |
commit | 3f336ad5cc9fc6b9ca9947719fce3b9e8ad0dbb6 (patch) | |
tree | 800428310a9713581a2caeafa567f4f15f69219f /actionpack/test/controller | |
parent | 77eb0a8493453773a4fda11320d889fae937ce89 (diff) | |
download | rails-3f336ad5cc9fc6b9ca9947719fce3b9e8ad0dbb6.tar.gz rails-3f336ad5cc9fc6b9ca9947719fce3b9e8ad0dbb6.tar.bz2 rails-3f336ad5cc9fc6b9ca9947719fce3b9e8ad0dbb6.zip |
Don't prepare response when rendering a component. Closes #8493.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6875 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/components_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/components_test.rb b/actionpack/test/controller/components_test.rb index 81f1d17ea9..c45a59bdbe 100644 --- a/actionpack/test/controller/components_test.rb +++ b/actionpack/test/controller/components_test.rb @@ -96,6 +96,12 @@ class ComponentsTest < Test::Unit::TestCase assert_equal "Ring, ring: Lady of the House, speaking", @response.body end + def test_etag_is_set_for_parent_template_when_calling_from_template + get :calling_from_template + expected_etag = etag_for("Ring, ring: Lady of the House, speaking") + assert_equal expected_etag, @response.headers['ETag'] + end + def test_internal_calling get :internal_caller assert_equal "Are you there? Yes, ma'am", @response.body @@ -126,4 +132,9 @@ class ComponentsTest < Test::Unit::TestCase assert_equal "Lady of the House, speaking", @response.body end + + protected + def etag_for(text) + %("#{Digest::MD5.hexdigest(text)}") + end end |