diff options
| author | Kasper Timm Hansen <kaspth@gmail.com> | 2016-12-31 18:45:52 +0100 | 
|---|---|---|
| committer | Kasper Timm Hansen <kaspth@gmail.com> | 2017-01-01 18:34:50 +0100 | 
| commit | 19deeb08df6279a9cbf0c65548641776c0451471 (patch) | |
| tree | d069c7893d2bd3d0a21d0c5b9d2058b1ec11d089 /activemodel/lib/active_model.rb | |
| parent | bf77e641ce807857fcf804250c4f8ce817ae66be (diff) | |
| download | rails-19deeb08df6279a9cbf0c65548641776c0451471.tar.gz rails-19deeb08df6279a9cbf0c65548641776c0451471.tar.bz2 rails-19deeb08df6279a9cbf0c65548641776c0451471.zip | |
Fix tests with counter cache touching and more.
* Refactor to use `touch_updates`
  Ensures we only call `current_time_from_proper_timezone` from one place.
* Clarify touch default in tests.
  Not interested in what happens when passed false but that
  nothing passed means no touching.
* Backdate touched columns in tests.
  We can't be sure a test progresses through time, so our
  touching code may be working correctly but the test
  itself is brittle.
  Fix by backdating that's further in the past akin to
  what the timestamps tests do:
  https://github.com/rails/rails/blob/d753645d40e925973724e4c3a8617b654da90e41/activerecord/test/cases/timestamp_test.rb#L17
* Expand changelog entry.
  Elaborate and show examples.
Closes #26995.
[ Jarred Trost & Kasper Timm Hansen ]
Diffstat (limited to 'activemodel/lib/active_model.rb')
0 files changed, 0 insertions, 0 deletions
