diff options
author | Andrew White <pixeltrix@users.noreply.github.com> | 2019-01-21 20:26:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-21 20:26:45 +0000 |
commit | 4f62e757caf608d30d46ee745f4f666fb8eba2a7 (patch) | |
tree | fe09316da3912e930f9cf512c5d8b35bc91a075a /activemodel/test | |
parent | feb97dfabd027a73a41ca8bd2ab7c3196ab76d3d (diff) | |
parent | ccdedeb9d5e1b2b74f03baef65aa8198b456e3b0 (diff) | |
download | rails-4f62e757caf608d30d46ee745f4f666fb8eba2a7.tar.gz rails-4f62e757caf608d30d46ee745f4f666fb8eba2a7.tar.bz2 rails-4f62e757caf608d30d46ee745f4f666fb8eba2a7.zip |
Merge pull request #34990 from rails/fix-time-multiparameter-casting
Fix year value when casting a multiparameter time hash
Diffstat (limited to 'activemodel/test')
-rw-r--r-- | activemodel/test/cases/type/time_test.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/test/cases/type/time_test.rb b/activemodel/test/cases/type/time_test.rb index 3fbae1a169..5c6271241d 100644 --- a/activemodel/test/cases/type/time_test.rb +++ b/activemodel/test/cases/type/time_test.rb @@ -16,6 +16,7 @@ module ActiveModel assert_equal ::Time.utc(2000, 1, 1, 16, 45, 54), type.cast("2015-06-13T19:45:54+03:00") assert_equal ::Time.utc(1999, 12, 31, 21, 7, 8), type.cast("06:07:08+09:00") + assert_equal ::Time.utc(2000, 1, 1, 16, 45, 54), type.cast(4 => 16, 5 => 45, 6 => 54) end def test_user_input_in_time_zone |