aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/activerecord/render_partial_with_record_identification_test.rb
diff options
context:
space:
mode:
authorRyan Bates <ryan@railscasts.com>2008-08-22 08:04:27 -0700
committerPratik Naik <pratiknaik@gmail.com>2008-08-22 18:15:53 +0100
commit9a5ffaa01e5a13d9ec2209a1a937d46fc12615a1 (patch)
tree79c0e40f315ce708e0ff75b4455557cfb0ce44ee /actionpack/test/activerecord/render_partial_with_record_identification_test.rb
parent4e4277b9e0a77c62dd1e253156bcde9e4a1a16b2 (diff)
downloadrails-9a5ffaa01e5a13d9ec2209a1a937d46fc12615a1.tar.gz
rails-9a5ffaa01e5a13d9ec2209a1a937d46fc12615a1.tar.bz2
rails-9a5ffaa01e5a13d9ec2209a1a937d46fc12615a1.zip
Ensure :partial => @collection and :collection => @collection behaves same. [#884 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/test/activerecord/render_partial_with_record_identification_test.rb')
-rw-r--r--actionpack/test/activerecord/render_partial_with_record_identification_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/activerecord/render_partial_with_record_identification_test.rb b/actionpack/test/activerecord/render_partial_with_record_identification_test.rb
index a82a1a3023..d75cb2b53a 100644
--- a/actionpack/test/activerecord/render_partial_with_record_identification_test.rb
+++ b/actionpack/test/activerecord/render_partial_with_record_identification_test.rb
@@ -39,6 +39,11 @@ class RenderPartialWithRecordIdentificationController < ActionController::Base
@developers = Developer.find(:all)
render :partial => @developers
end
+
+ def render_with_record_collection_and_spacer_template
+ @developer = Developer.find(1)
+ render :partial => @developer.projects, :spacer_template => 'test/partial_only'
+ end
end
class RenderPartialWithRecordIdentificationTest < ActiveRecordTestCase
@@ -81,6 +86,11 @@ class RenderPartialWithRecordIdentificationTest < ActiveRecordTestCase
assert_equal 'DavidJamisfixture_3fixture_4fixture_5fixture_6fixture_7fixture_8fixture_9fixture_10Jamis', @response.body
end
+ def test_render_with_record_collection_and_spacer_template
+ get :render_with_record_collection_and_spacer_template
+ assert_equal 'Active Recordonly partialActive Controller', @response.body
+ end
+
def test_rendering_partial_with_has_one_association
mascot = Company.find(1).mascot
get :render_with_has_one_association