aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_render_test.rb
diff options
context:
space:
mode:
authorCameron Yule <cameron@Zeppelin.local>2008-08-09 10:34:19 -0500
committerJoshua Peek <josh@joshpeek.com>2008-08-09 10:48:56 -0500
commit2faf35cea9846fdfa1099f5dfd1589d53a3daf3b (patch)
tree0f43c32ce041e6af277fe57e02264db6cd81a327 /actionpack/test/controller/new_render_test.rb
parentea0d036e31d984888303a79533ff872b787871ae (diff)
downloadrails-2faf35cea9846fdfa1099f5dfd1589d53a3daf3b.tar.gz
rails-2faf35cea9846fdfa1099f5dfd1589d53a3daf3b.tar.bz2
rails-2faf35cea9846fdfa1099f5dfd1589d53a3daf3b.zip
Added tests for partial collection counters [#766 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/test/controller/new_render_test.rb')
-rw-r--r--actionpack/test/controller/new_render_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/controller/new_render_test.rb b/actionpack/test/controller/new_render_test.rb
index d2a3a2b0b0..be99350cd2 100644
--- a/actionpack/test/controller/new_render_test.rb
+++ b/actionpack/test/controller/new_render_test.rb
@@ -136,6 +136,10 @@ class NewRenderTestController < ActionController::Base
render :partial => "partial_only", :layout => true
end
+ def partial_with_counter
+ render :partial => "counter", :locals => { :counter_counter => 5 }
+ end
+
def partial_with_locals
render :partial => "customer", :locals => { :customer => Customer.new("david") }
end
@@ -741,6 +745,11 @@ EOS
assert_equal "<title>Talking to the layout</title>\nAction was here!", @response.body
end
+ def test_partial_with_counter
+ get :partial_with_counter
+ assert_equal "5", @response.body
+ end
+
def test_partials_list
get :partials_list
assert_equal "goodbyeHello: davidHello: marygoodbye\n", @response.body