From e3898491f2960890d866bfe08e221a4cb52cfccc Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Thu, 19 Jan 2006 08:47:18 +0000 Subject: make error_messages_for return "" for nil objects git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3438 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/template/active_record_helper_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionpack/test/template') 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 %(

1 error prohibited this post from being saved

There were problems with the following fields:

), error_messages_for("post") assert_equal %(

1 error prohibited this post from being saved

There were problems with the following fields:

), 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( -- cgit v1.2.3