diff options
author | Marcel Molina <marcel@vernix.org> | 2007-10-23 17:57:47 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2007-10-23 17:57:47 +0000 |
commit | 6f559f871e9278aea65471f1ce31fab15536f56a (patch) | |
tree | 644996ac7817775309f4c6222e6cf29f7b367b55 /actionpack/test | |
parent | 7b42a1d0ac2aa1c7ba544949bd14c2f166293b00 (diff) | |
download | rails-6f559f871e9278aea65471f1ce31fab15536f56a.tar.gz rails-6f559f871e9278aea65471f1ce31fab15536f56a.tar.bz2 rails-6f559f871e9278aea65471f1ce31fab15536f56a.zip |
Added tests for options to ActiveRecordHelper#form. Closes #7213 [richcollins, mikong, mislav]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8005 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/template/active_record_helper_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb index 6ef74aa8e7..bec29e134f 100644 --- a/actionpack/test/template/active_record_helper_test.rb +++ b/actionpack/test/template/active_record_helper_test.rb @@ -91,6 +91,8 @@ class ActiveRecordHelperTest < Test::Unit::TestCase setup_post setup_user + @response = ActionController::TestResponse.new + @controller = Object.new def @controller.url_for(options) options = options.symbolize_keys @@ -139,6 +141,13 @@ class ActiveRecordHelperTest < Test::Unit::TestCase ) end + def test_form_with_action_option + @response.body = form("post", :action => "sign") + assert_select "form[action=sign]" do |form| + assert_select "input[type=submit][value=Sign]" + end + end + def test_form_with_date silence_warnings do def Post.content_columns() [ Column.new(:date, "written_on", "Written on") ] end |