aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql/infinity_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* PostgreSQL: Treat infinite values in date like datetime consistentlyRyuta Kamizono2018-02-231-0/+39
| | | | | | | | | | | | | | The values infinity and -infinity are supported by both date and timestamp types. https://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-DATETIME-SPECIAL-TABLE And also, it can not be known whether a value is infinity correctly unless cast a value. I've added `QueryAttribute#infinity?` to handle that case. Closes #27585.
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-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
|
* Add assertion messagesAkira Matsuda2017-01-251-1/+1
| | | | | This message could be generated by `assert_predicate`, https://github.com/rails/rails/commit/1853a4f2c8b2bddfbde6aae80abb08310295201c#commitcomment-20546113 but I'd rather handwrite the message string if I could reduce magic from the code by doing so.
* assert_send is going to be deprecated since minitest 5.10.0Akira Matsuda2017-01-181-1/+1
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* make it possible to run AR tests with bin/testYves Senn2015-06-111-1/+1
|
* PostgreSQL, Add test case for "Infinity" string assignment to float columns.Lars Kanis2015-03-221-0/+9
| | | | This is implemented in Type::Float, but not tested, so far.
* Prefer `drop_table if_exists: true` over raw SQLRyuta Kamizono2015-02-181-1/+1
| | | | | Lowercase raw SQL has been replaced by 07b659c already. This commit replaces everything else of raw SQL.
* Update test case for TZ aware attributesSean Griffin2014-12-081-4/+14
| | | | | | The test added in 42418cfc94d1356d35d28d786f63e7fab9406ad6 wasn't actually testing anything, since the bug was with TZ aware attributes only.
* Allow custom handling of non-standard types in `time_zone_conversion`Sean Griffin2014-12-081-0/+6
| | | | | | | | | | | | PostgreSQL for example, allows infinity as a valid value for date time columns. The PG type has explicit handling for that case. However, time zone conversion will end up trampling that handling. Unfortunately, we can't call super and then convert time zones. However, if we get back nil from `.in_time_zone`, it's something we didn't expect so we can let the superclass handle it. Fixes #17971
* Do not rely on the column type when quoting infinitySean Griffin2014-07-031-0/+44