From 087437a08c27c6699e0650697b11ff0e82b32c10 Mon Sep 17 00:00:00 2001 From: Daniel Guettler Date: Sun, 13 Jul 2008 00:48:58 -0400 Subject: [PATCH] - added test to make sure caching works after render :inline --- actionpack/test/controller/caching_test.rb | 8 ++++++++ .../inline_fragment_cached.html.erb | 2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) create mode 100644 actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index f9b6b87..f18cefc 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -607,4 +607,12 @@ CACHED assert_match /Fragment caching in a partial/, @response.body assert_match "Fragment caching in a partial", @store.read('views/test.host/functional_caching/js_fragment_cached_with_partial') end + + def test_render_inline_before_fragment_caching + get :inline_fragment_cached + assert_response :success + assert_match /Some inline content/, @response.body + assert_match /Some cached content/, @response.body + assert_match "Some cached content", @store.read('views/test.host/functional_caching/inline_fragment_cached') + end end diff --git a/actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb b/actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb new file mode 100644 index 0000000..725d89d --- /dev/null +++ b/actionpack/test/fixtures/functional_caching/inline_fragment_cached.html.erb @@ -0,0 +1,2 @@ +<%= render :inline => 'Some inline content' %> +<% cache do %>Some cached content<% end %> \ No newline at end of file -- 1.5.6