Skip to content

Commit

Permalink
Added tests for options to ActiveRecordHelper#form. Closes #7213 [ric…
Browse files Browse the repository at this point in the history
…hcollins, mikong, mislav]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8005 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
Marcel Molina committed Oct 23, 2007
1 parent 7b42a1d commit 6f559f8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*

* Added tests for options to ActiveRecordHelper#form. Closes #7213 [richcollins, mikong, mislav]

* Changed before_filter halting to happen automatically on render or redirect but no longer on simply returning false [DHH]

* Ensure that cookies handle array values correctly. Closes #9937 [queso]
Expand Down
9 changes: 9 additions & 0 deletions actionpack/test/template/active_record_helper_test.rb
Expand Up @@ -91,6 +91,8 @@ def setup
setup_post
setup_user

@response = ActionController::TestResponse.new

@controller = Object.new
def @controller.url_for(options)
options = options.symbolize_keys
Expand Down Expand Up @@ -139,6 +141,13 @@ def id() 1 end
)
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
Expand Down

0 comments on commit 6f559f8

Please sign in to comment.