diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2011-02-12 14:45:58 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-02-12 16:40:41 -0200 |
commit | ad5b4d980aec128e028b721156aa4433199e30ab (patch) | |
tree | 13f965e7ea84f9215a455b3de56ea0064b8f4449 /actionpack | |
parent | 829de9d98e59f9b083ed96a9031cd9841c83ae47 (diff) | |
download | rails-ad5b4d980aec128e028b721156aa4433199e30ab.tar.gz rails-ad5b4d980aec128e028b721156aa4433199e30ab.tar.bz2 rails-ad5b4d980aec128e028b721156aa4433199e30ab.zip |
Remove duplicated action pack tests added to fix issue with fields_for, nested attributes and erb
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index b3220d6aa6..31da26de7f 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -1103,25 +1103,6 @@ class FormHelperTest < ActionView::TestCase assert_dom_equal expected, output_buffer end - def test_nested_fields_for_with_an_existing_record_on_a_nested_attributes_one_to_one_association_using_erb_and_multiline_block - @post.author = Author.new(321) - - form_for(@post) do |f| - concat f.text_field(:title) - concat f.fields_for(:author) { |af| - concat af.text_field(:name) - } - end - - expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'put') do - '<input name="post[title]" size="30" type="text" id="post_title" value="Hello World" />' + - '<input id="post_author_attributes_name" name="post[author_attributes][name]" size="30" type="text" value="author #321" />' + - '<input id="post_author_attributes_id" name="post[author_attributes][id]" type="hidden" value="321" />' - end - - assert_dom_equal expected, output_buffer - end - def test_nested_fields_for_with_existing_records_on_a_nested_attributes_one_to_one_association_with_explicit_hidden_field_placement @post.author = Author.new(321) @@ -1188,29 +1169,6 @@ class FormHelperTest < ActionView::TestCase assert_dom_equal expected, output_buffer end - def test_nested_fields_for_with_existing_records_on_a_nested_attributes_collection_association_using_erb_and_multiline_block - @post.comments = Array.new(2) { |id| Comment.new(id + 1) } - - form_for(@post) do |f| - concat f.text_field(:title) - @post.comments.each do |comment| - concat f.fields_for(:comments, comment) { |cf| - concat cf.text_field(:name) - } - end - end - - expected = whole_form('/posts/123', 'edit_post_123', 'edit_post', :method => 'put') do - '<input name="post[title]" size="30" type="text" id="post_title" value="Hello World" />' + - '<input id="post_comments_attributes_0_name" name="post[comments_attributes][0][name]" size="30" type="text" value="comment #1" />' + - '<input id="post_comments_attributes_0_id" name="post[comments_attributes][0][id]" type="hidden" value="1" />' + - '<input id="post_comments_attributes_1_name" name="post[comments_attributes][1][name]" size="30" type="text" value="comment #2" />' + - '<input id="post_comments_attributes_1_id" name="post[comments_attributes][1][id]" type="hidden" value="2" />' - end - - assert_dom_equal expected, output_buffer - end - def test_nested_fields_for_with_existing_records_on_a_nested_attributes_collection_association_with_explicit_hidden_field_placement @post.comments = Array.new(2) { |id| Comment.new(id + 1) } |