mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Added tests for partial collection counters [#766 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
This commit is contained in:
committed by
Joshua Peek
parent
ea0d036e31
commit
2faf35cea9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user