aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/type/time_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29f"Rafael Mendonça França2019-08-021-1/+1
| | | | This reverts commit dd779c9686f49f5ed6dda8ad5a1cb3b0788e1dd4.
* No such class since 8d2866bb80fbe81acb04f5b0c44f152f571fb29fAkira Matsuda2019-08-021-1/+1
|
* Fix year value when casting a multiparameter time hashAndrew White2019-01-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | When assigning a hash to a time attribute that's missing a year component (e.g. a `time_select` with `:ignore_date` set to `true`) then the year defaults to 1970 instead of the expected 2000. This results in the attribute changing as a result of the save. Before: event = Event.new(start_time: { 4 => 20, 5 => 30 }) event.start_time # => 1970-01-01 20:30:00 UTC event.save event.reload event.start_time # => 2000-01-01 20:30:00 UTC After: event = Event.new(start_time: { 4 => 20, 5 => 30 }) event.start_time # => 2000-01-01 20:30:00 UTC event.save event.reload event.start_time # => 2000-01-01 20:30:00 UTC
* Fix user_input_in_time_zone to coerce non valid string into nilAnnie-Claude Côté2018-05-161-0/+15
| | | | Before it was coercing an invalid string into "2000-01-01 00:00:00".
* Add missing autoload `Type` (#31123)Ryuta Kamizono2017-11-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Attribute modules (`Attribute`, `Attributes`, `AttributeSet`) uses `Type`, but referencing `Type` before the modules still fail. ``` % ./bin/test -w test/cases/attribute_test.rb -n test_with_value_from_user_validates_the_value Run options: -n test_with_value_from_user_validates_the_value --seed 31876 E Error: ActiveModel::AttributeTest#test_with_value_from_user_validates_the_value: NameError: uninitialized constant ActiveModel::AttributeTest::Type /Users/kamipo/src/github.com/rails/rails/activemodel/test/cases/attribute_test.rb:233:in `block in <class:AttributeTest>' bin/test test/cases/attribute_test.rb:232 Finished in 0.002985s, 335.0479 runs/s, 335.0479 assertions/s. 1 runs, 1 assertions, 0 failures, 1 errors, 0 skips ``` Probably we need more autoloading at least `Type`.
* Use frozen string literal in activemodel/Kir Shatrov2017-07-161-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* "Use assert_nil if expecting nil. This will fail in minitest 6."Akira Matsuda2016-12-251-3/+3
|
* Refactored ActiveModel::Type tests into their own filesIain Beeston2016-10-151-0/+21