diff options
author | Thilo Utke <thilo@upstre.am> | 2010-11-28 14:36:40 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-12-01 11:43:37 +0100 |
commit | 7148b933c4865a5140187d7ed792fd6df9b860a4 (patch) | |
tree | 56f77db136192f65eb4e3a1417d8b989e56cfe37 /activemodel/test/cases/validations_test.rb | |
parent | 1ec126dd37b52ecf7c0c24a842fc87836d8f2e9b (diff) | |
download | rails-7148b933c4865a5140187d7ed792fd6df9b860a4.tar.gz rails-7148b933c4865a5140187d7ed792fd6df9b860a4.tar.bz2 rails-7148b933c4865a5140187d7ed792fd6df9b860a4.zip |
ActiveModel::Errors.to_hash returns plain OrderedHash and used in to_json serialization to properly handle multiple errors per attribute [#5615 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activemodel/test/cases/validations_test.rb')
-rw-r--r-- | activemodel/test/cases/validations_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index 4024002aaa..55b477dd10 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -174,8 +174,8 @@ class ValidationsTest < ActiveModel::TestCase assert_match %r{<error>Content can't be blank</error>}, xml hash = ActiveSupport::OrderedHash.new - hash[:title] = "can't be blank" - hash[:content] = "can't be blank" + hash[:title] = ["can't be blank"] + hash[:content] = ["can't be blank"] assert_equal t.errors.to_json, hash.to_json end |