1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases
Arthur Neves e7c48db509 Make sure we touch all the parents when touch_later.
The problem was that when saving an object, we would
call touch_later on the parent which wont be saved immediteally, and
it wont call any callbacks. That was working one level up because
we were calling touch, during the touch_later commit phase. However that still
didnt solve the problem when you have a 3+ levels of parents to be touched,
as calling touch would affect the parent, but it would be too late to run callbacks
on its grand-parent.

The solution for this, is instead, call touch_later upwards when the first
touch_later is called. So we make sure all the timestamps are updated without relying
on callbacks.

This also removed the hard dependency BelongsTo builder had with the TouchLater module.
So we can still have the old behaviour if TouchLater module is not included.

[fixes 5f5e6d9249]
[related #19324]
2015-12-06 16:53:00 -05:00
..
adapters remove warning from postgresql geometric test 2015-12-05 12:17:07 +09:00
associations Bugfix collection association #create method … 2015-11-23 16:22:03 +02:00
attribute_methods Attribute assignment and type casting has nothing to do with columns 2015-01-31 19:42:38 -07:00
coders
connection_adapters introduce conn.data_source_exists? and conn.data_sources. 2015-09-22 19:48:44 +02:00
connection_specification
fixture_set Merge pull request #20574 from repinel/fix-db-fixtures-load 2015-09-30 11:06:41 +02:00
migration Move migration/postgresql_geometric_types_test.rb in adapters/postgresql/geometric_test.rb 2015-11-24 06:10:10 +09:00
relation Ensure Relation responds to shuffle 2015-12-01 16:41:50 -07:00
scoping Removed mocha from Active Record Part 1 2015-08-25 22:07:25 +05:30
tasks Fix rake db:structure:dump on Postgres when multiple schemas are used. 2015-11-19 11:42:04 -07:00
type skipped assertion on datetime seconds precision as it is only valid for newer mysql versions 2015-09-24 00:35:50 +05:30
validations Improve support for non Active Record objects on validates_associated 2015-11-08 10:58:39 -02:00
adapter_test.rb Deprecate #table_exists?, #tables and passing arguments to #talbes 2015-11-09 23:13:23 +09:00
aggregations_test.rb
ar_schema_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
associations_test.rb Remove unnecessary require in associations_test.rb 2015-09-03 04:27:07 +09:00
attribute_decorators_test.rb type_cast_from_user -> cast 2015-02-17 13:39:42 -07:00
attribute_methods_test.rb 💣 2015-10-02 08:21:36 -04:00
attribute_set_test.rb Implement equality comparison on AttributeSet and friends 2015-10-06 08:52:28 -06:00
attribute_test.rb Further encapsulate dirty checking on Attribute 2015-10-02 08:03:11 -04:00
attributes_test.rb Ensure #reset_column_information clears child classes as well 2015-11-07 08:20:34 -07:00
autosave_association_test.rb Merge pull request #19686 from tsun1215/index_errors 2015-10-26 16:05:16 -06:00
base_test.rb add ActiveRecord::Base.has_attribute? 2015-12-02 16:57:29 +01:00
batches_test.rb Fix merge conflicts from #19501 2015-10-29 09:22:45 -06:00
binary_test.rb Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 onwards. 2015-02-03 20:51:40 +05:30
bind_parameter_test.rb rm Column#cast_type 2015-02-03 15:02:18 -07:00
cache_key_test.rb fixes #21815 2015-10-16 15:09:45 +02:00
calculations_test.rb Fix generated projection fields in group by query 2015-10-22 04:22:57 -03:00
callbacks_test.rb AR::RecordNotSaved & RecordNotDestroyed should include an error message 2015-05-01 19:01:41 -07:00
clone_test.rb
collection_cache_key_test.rb fixes #21815 2015-10-16 15:09:45 +02:00
column_alias_test.rb
column_definition_test.rb rm Column#cast_type 2015-02-03 15:02:18 -07:00
connection_management_test.rb Fix wrong assert_equal argument order. 2015-11-07 11:35:01 +01:00
connection_pool_test.rb Require only necessary concurrent-ruby classes. 2015-11-04 21:12:28 -05:00
core_test.rb pretty_print will use #inspect if a subclass redefines it 2015-01-12 15:17:32 -08:00
counter_cache_test.rb Fix counter_cache for polymorphic associations 2015-07-19 15:52:29 -06:00
custom_locking_test.rb
database_statements_test.rb
date_time_precision_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
date_time_test.rb Fix a false assertion 2015-01-17 08:09:41 -08:00
defaults_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
dirty_test.rb Don't assert fractional seconds can be applied on unsupported adapters 2015-09-24 15:27:59 -06:00
disconnected_test.rb Silence warning from MySQL::Error object in test 2015-04-23 17:05:03 -04:00
dup_test.rb
enum_test.rb use assert_not instead of refute as mentioned in our guides. 2015-08-13 09:20:39 +02:00
errors_test.rb Make ActiveRecordException descendants args optional 2015-09-07 00:04:31 -07:00
explain_subscriber_test.rb Let WITH (CTE) queries be explainable 2015-05-28 14:10:09 +03:00
explain_test.rb Removed mocha from Active Record Part 2 2015-09-16 21:57:10 +05:30
finder_respond_to_test.rb
finder_test.rb Remove some bind related test cases from finder_test.rb to sanitize_test.rb 2015-11-21 11:34:36 +09:00
fixtures_test.rb FixtureSet.fixture_class_names should have no default value 2015-10-29 11:23:58 -06:00
forbidden_attributes_protection_test.rb Fix more test failures caused by #21000 2015-11-23 15:36:38 -07:00
habtm_destroy_order_test.rb
helper.rb Make AbstractMysqlAdapter#version public 2015-10-15 07:18:55 +09:00
hot_compatibility_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
i18n_test.rb
inheritance_test.rb don't rely on the columns hash to get defaults. follow-up to #17169. 2015-12-02 17:14:45 +01:00
integration_test.rb fixes #21815 2015-10-16 15:09:45 +02:00
invalid_connection_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
invalid_date_test.rb
invertible_migration_test.rb Deprecate #table_exists?, #tables and passing arguments to #talbes 2015-11-09 23:13:23 +09:00
json_serialization_test.rb
locking_test.rb Fix the test that was broken by #16445 rather than deleting it 2015-07-19 15:52:31 -06:00
log_subscriber_test.rb test_binary_data_is_not_logged is for prepared statements logging 2015-11-05 17:39:53 +09:00
migration_test.rb Revert "Allow specifying the default table options for mysql adapters" 2015-11-19 10:01:06 -07:00
migrator_test.rb Deprecate #table_exists?, #tables and passing arguments to #talbes 2015-11-09 23:13:23 +09:00
mixin_test.rb remove unnecessary rescue 2015-03-05 15:05:47 -08:00
modules_test.rb remove old unavailable link with relevant fix 2015-03-23 11:18:14 +05:30
multiparameter_attributes_test.rb Push multi-parameter assignement into the types 2015-02-07 13:52:23 -07:00
multiple_db_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
nested_attributes_test.rb Update and fix forbidden attributes tests 2015-11-03 11:34:07 -08:00
nested_attributes_with_callbacks_test.rb
persistence_test.rb Fix test failures 2015-11-07 08:44:29 -07:00
pooled_connections_test.rb Deprecate #table_exists?, #tables and passing arguments to #talbes 2015-11-09 23:13:23 +09:00
primary_keys_test.rb Deprecate #table_exists?, #tables and passing arguments to #talbes 2015-11-09 23:13:23 +09:00
query_cache_test.rb Removed mocha from Active Record Part 1 2015-08-25 22:07:25 +05:30
quoting_test.rb Refactor microsecond precision to be database agnostic 2015-02-10 11:55:59 -07:00
readonly_test.rb Further fix failing tests caused by #21350 2015-08-24 08:10:48 -06:00
reaper_test.rb
reflection_test.rb Removed mocha from Active Record Part 1 2015-08-25 22:07:25 +05:30
relation_test.rb Raise ArgumentError when passing a truthy value to merge 2015-11-17 14:57:48 +00:00
relations_test.rb Merge pull request #13008 from ktheory/sanitize_order 2015-10-29 15:29:06 -06:00
reload_models_test.rb fix test not failing when executed isolated 2015-06-19 16:02:12 -03:00
result_test.rb
sanitize_test.rb Remove some bind related test cases from finder_test.rb to sanitize_test.rb 2015-11-21 11:34:36 +09:00
schema_dumper_test.rb Merge pull request #22271 from timbreitkreutz/twb-9015-schema-dumper-test-for-prefix-and-ignore 2015-11-17 12:20:46 +01:00
secure_token_test.rb Do not overwrite secret token value when already present. 2015-02-12 22:05:45 +01:00
serialization_test.rb Remove XML Serialization from core. 2015-08-07 11:01:48 -04:00
serialized_attribute_test.rb Add a test to ensure serialize persists nil as NULL 2015-06-12 13:50:51 -06:00
statement_cache_test.rb
store_test.rb
suppressor_test.rb Apply Active Record suppression to all saves 2015-06-04 00:11:38 -04:00
test_case.rb Remove #tables extra args again 2015-10-22 13:16:35 +09:00
test_fixtures_test.rb 🔪 Typos 2015-09-21 03:17:39 +09:00
time_precision_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
timestamp_test.rb Further remove reliance on subsecond precision in tests 2015-09-23 09:43:19 -06:00
touch_later_test.rb Make sure we touch all the parents when touch_later. 2015-12-06 16:53:00 -05:00
transaction_callbacks_test.rb Introduce after_{create,update,delete}_commit callbacks 2015-12-06 20:33:36 +02:00
transaction_isolation_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
transactions_test.rb Removed mocha from Active Record Part 2 2015-09-16 21:57:10 +05:30
type_test.rb Add a global type registry, used to lookup and register types 2015-02-15 14:22:08 -07:00
types_test.rb Move the appropriate type tests to the Active Model suite 2015-09-21 10:12:31 -06:00
unconnected_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
validations_repair_helper.rb
validations_test.rb validates_acceptance_of shouldn't require a database connection 2015-09-25 07:54:38 -06:00
view_test.rb Deprecate #table_exists?, #tables and passing arguments to #talbes 2015-11-09 23:13:23 +09:00
yaml_serialization_test.rb Add YAML compatibility for objects from Rails 4.2 2015-03-10 11:56:45 -06:00