diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-30 14:42:44 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-04-30 14:42:44 -0500 |
commit | a3da293b3363a56c28773088cbf932115eb3a2b0 (patch) | |
tree | d8132e6d7c3d10c0a32676f45c454837144316da /actionpack/test/activerecord | |
parent | a6cca5d1fc94bc62a1b5c4a3facafb7044021cd2 (diff) | |
download | rails-a3da293b3363a56c28773088cbf932115eb3a2b0.tar.gz rails-a3da293b3363a56c28773088cbf932115eb3a2b0.tar.bz2 rails-a3da293b3363a56c28773088cbf932115eb3a2b0.zip |
Fixed render :partial => @collection.named_scope (nkallen) [#61 state:resolved]
Diffstat (limited to 'actionpack/test/activerecord')
-rw-r--r-- | actionpack/test/activerecord/render_partial_with_record_identification_test.rb | 17 |
1 files changed, 7 insertions, 10 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 773018d445..94070f5523 100644 --- a/actionpack/test/activerecord/render_partial_with_record_identification_test.rb +++ b/actionpack/test/activerecord/render_partial_with_record_identification_test.rb @@ -14,6 +14,10 @@ class RenderPartialWithRecordIdentificationTest < ActiveRecordTestCase render :partial => @topic.replies end + def render_with_named_scope + render :partial => Reply.base + end + def render_with_has_many_through_association @developer = Developer.find(:first) render :partial => @developer.topics @@ -53,16 +57,9 @@ class RenderPartialWithRecordIdentificationTest < ActiveRecordTestCase assert_template 'replies/_reply' end - def test_rendering_partial_with_has_many_association - get :render_with_has_many_through_association - assert_template 'topics/_topic' - end - - def test_rendering_partial_with_belongs_to_association - topic = Reply.find(1).topic - get :render_with_belongs_to_association - assert_template 'topics/_topic' - assert_equal topic.title, @response.body + def test_rendering_partial_with_named_scope + get :render_with_named_scope + assert_template 'replies/_reply' end def test_render_with_record |