aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/date_time_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Fix `ActiveModel::Type::DateTime#serialize`Lisa Ugray2017-07-051-0/+13
| | | | | `ActiveModel::Type::DateTime#serialize` should return a `Time` object so that finding by a datetime column works correctly.
* 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
|
* Update `DateTime#change` to support usec and nsecAndrew White2017-03-021-1/+1
| | | | | | | | | | | Adding support for these options now allows us to update the `DateTime#end_of` methods to match the equivalent `Time#end_of` methods, e.g: datetime = DateTime.now.end_of_day datetime.nsec == 999999999 # => true Fixes #21424.
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-7/+7
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Fix a false assertionYuki Nishijima2015-01-171-1/+1
| | | | #assert was used when it should be assert_equal.
* Support datetime values in AR::Type::DateTime#type_cast_for_databasebrainopia2015-01-031-0/+8
|
* Don't raise on out-of-range datetimes passed by a userGrey Baker2014-12-231-0/+10
|
* prevent global timezone state from leaking out of test cases.Yves Senn2013-10-251-1/+1
|
* Deprecate obsolete Time to DateTime fallback methodsAndrew White2012-12-111-3/+3
| | | | | | | The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time methods were added to handle the limitations of Ruby's native Time implementation. Those limitations no longer apply so we are deprecating them in 4.0 and they will be removed in 4.1.
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Move helper methods to helper.rb. Make test not depend on local TZ to pass ↵Emilio Tagua2010-09-211-9/+13
| | | | | | or fail. Signed-off-by: José Valim <jose.valim@gmail.com>
* create DateTime value with local offset as later it is compared to Time ↵Raimonds Simanovskis2010-06-041-1/+3
| | | | | | value with local offset (otherwise test is failing for oracle_enhanced JDBC adapter)
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-211-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix pathsJeremy Kemper2008-01-181-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move tests to casesJeremy Kemper2008-01-181-0/+37
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de