diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2012-01-06 13:25:48 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2012-01-06 13:26:14 -0200 |
commit | 3853b73bf8535efcf55f573f4b269e1082c3d5cd (patch) | |
tree | e878673eb72d09294eab5cc3824437de50349881 /actionpack/test/template | |
parent | 26a9bfb23bc9cfd3638f9db8ef60413479f36f36 (diff) | |
download | rails-3853b73bf8535efcf55f573f4b269e1082c3d5cd.tar.gz rails-3853b73bf8535efcf55f573f4b269e1082c3d5cd.tar.bz2 rails-3853b73bf8535efcf55f573f4b269e1082c3d5cd.zip |
Do not stub id here
Diffstat (limited to 'actionpack/test/template')
-rw-r--r-- | actionpack/test/template/form_helper_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index a36b1f713f..942be67d02 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -65,7 +65,7 @@ class FormHelperTest < ActionView::TestCase def full_messages() [ "Author name can't be empty" ] end }.new end - def @post.id; 123; end + def @post.to_key; [123]; end def @post.id_before_type_cast; 123; end def @post.to_param; '123'; end @@ -628,7 +628,7 @@ class FormHelperTest < ActionView::TestCase end def test_auto_index - pid = @post.id + pid = 123 assert_dom_equal( "<label for=\"post_#{pid}_title\">Title</label>", label("post[]", "title") @@ -654,7 +654,7 @@ class FormHelperTest < ActionView::TestCase end def test_auto_index_with_nil_id - pid = @post.id + pid = 123 assert_dom_equal( "<input name=\"post[#{pid}][title]\" size=\"30\" type=\"text\" value=\"Hello World\" />", text_field("post[]","title", :id => nil) @@ -867,7 +867,7 @@ class FormHelperTest < ActionView::TestCase def test_form_for_with_remote_without_html @post.persisted = false - def @post.id; nil; end + def @post.to_key; nil; end form_for(@post, :remote => true) do |f| concat f.text_field(:title) concat f.text_area(:body) @@ -1017,7 +1017,7 @@ class FormHelperTest < ActionView::TestCase old_locale, I18n.locale = I18n.locale, :submit @post.persisted = false - def @post.id; nil; end + def @post.to_key; nil; end form_for(@post) do |f| concat f.submit end @@ -2089,7 +2089,7 @@ class FormHelperTest < ActionView::TestCase def test_form_for_with_new_object post = Post.new post.persisted = false - def post.id() nil end + def post.to_key; nil; end form_for(post) do |f| end |