aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/active_record_helper_test.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2006-12-27 20:46:12 +0000
committerMichael Koziarski <michael@koziarski.com>2006-12-27 20:46:12 +0000
commit810d0ade2bb04464fbbd5497b4cc092ed80fc53a (patch)
treeefd047279ddcbbfaaa5288826f8b82d045083fb9 /actionpack/test/template/active_record_helper_test.rb
parent3b4450bb8043eca6ca0d423263e598c70c50f440 (diff)
downloadrails-810d0ade2bb04464fbbd5497b4cc092ed80fc53a.tar.gz
rails-810d0ade2bb04464fbbd5497b4cc092ed80fc53a.tar.bz2
rails-810d0ade2bb04464fbbd5497b4cc092ed80fc53a.zip
Make error_message_on handle nil objects. [dan]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5799 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 8b6a7abd6f..c4e5ca66c2 100644
--- a/actionpack/test/template/active_record_helper_test.rb
+++ b/actionpack/test/template/active_record_helper_test.rb
@@ -170,6 +170,10 @@ class ActiveRecordHelperTest < Test::Unit::TestCase
def test_error_messages_for_handles_nil
assert_equal "", error_messages_for("notthere")
end
+
+ def test_error_message_on_handles_nil
+ assert_equal "", error_message_on("notthere", "notthere")
+ end
def test_error_messages_for_many_objects
assert_dom_equal %(<div class="errorExplanation" id="errorExplanation"><h2>2 errors 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><li>User email can't be empty</li></ul></div>), error_messages_for("post", "user")