aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorSen-Zhang <solowolf21@126.com>2016-03-14 18:51:25 -0700
committerSen-Zhang <solowolf21@126.com>2016-11-01 18:17:26 -0700
commit9bf4583241e189d04a5df143332107ef18857034 (patch)
tree91b8eb5ba3f8b5108508fe70e0918d94b2478199 /activerecord/test
parent9ebb3558f4bddc2af52829abd2b198bc7fab4a13 (diff)
downloadrails-9bf4583241e189d04a5df143332107ef18857034.tar.gz
rails-9bf4583241e189d04a5df143332107ef18857034.tar.bz2
rails-9bf4583241e189d04a5df143332107ef18857034.zip
fix datatime error
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/multiparameter_attributes_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/cases/multiparameter_attributes_test.rb b/activerecord/test/cases/multiparameter_attributes_test.rb
index 18ecc67f0b..ceb5724377 100644
--- a/activerecord/test/cases/multiparameter_attributes_test.rb
+++ b/activerecord/test/cases/multiparameter_attributes_test.rb
@@ -260,6 +260,13 @@ class MultiParameterAttributeTest < ActiveRecord::TestCase
topic.attributes = attributes
assert_equal Time.zone.local(2000, 1, 1, 16, 24, 0), topic.bonus_time
assert_not topic.bonus_time.utc?
+
+ attributes = {
+ "written_on(1i)" => "2000", "written_on(2i)" => "", "written_on(3i)" => "",
+ "written_on(4i)" => "", "written_on(5i)" => ""
+ }
+ topic.attributes = attributes
+ assert_nil topic.written_on
end
ensure
Topic.reset_column_information