aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/active_record_helper_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2006-01-19 08:47:18 +0000
committerMichael Koziarski <michael@koziarski.com>2006-01-19 08:47:18 +0000
commite3898491f2960890d866bfe08e221a4cb52cfccc (patch)
tree3262187d7f3e87561648e23f9847b56824f6a304 /actionpack/test/template/active_record_helper_test.rb
parent363b79f9428395249d7509ddc88e1080902d6256 (diff)
downloadrails-e3898491f2960890d866bfe08e221a4cb52cfccc.tar.gz
rails-e3898491f2960890d866bfe08e221a4cb52cfccc.tar.bz2
rails-e3898491f2960890d866bfe08e221a4cb52cfccc.zip
make error_messages_for return "" for nil objects
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template/active_record_helper_test.rb')
-rw-r--r--actionpack/test/template/active_record_helper_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/template/active_record_helper_test.rb b/actionpack/test/template/active_record_helper_test.rb
index acff1b5e40..e153e630ab 100644
--- a/actionpack/test/template/active_record_helper_test.rb
+++ b/actionpack/test/template/active_record_helper_test.rb
@@ -119,6 +119,10 @@ class ActiveRecordHelperTest < Test::Unit::TestCase
assert_dom_equal %(<div class="errorExplanation" id="errorExplanation"><h2>1 error prohibited this post from being saved</h2><p>There were problems with the following fields:</p><ul><li>Author name can't be empty</li></ul></div>), error_messages_for("post")
assert_equal %(<div class="errorDeathByClass" id="errorDeathById"><h1>1 error prohibited this post from being saved</h1><p>There were problems with the following fields:</p><ul><li>Author name can't be empty</li></ul></div>), error_messages_for("post", :class => "errorDeathByClass", :id => "errorDeathById", :header_tag => "h1")
end
+
+ def test_error_messages_for_handles_nil
+ assert_equal "", error_messages_for("notthere")
+ end
def test_form_with_string_multipart
assert_dom_equal(