Methods
- T
-
- test_cache_key_changes_when_child_touched,
- test_cache_key_for_existing_record_is_not_timezone_dependent,
- test_cache_key_for_newer_updated_at,
- test_cache_key_for_newer_updated_on,
- test_cache_key_for_updated_on,
- test_cache_key_format_for_existing_record_with_nil_updated_timestamps,
- test_cache_key_format_for_existing_record_with_updated_at,
- test_cache_key_format_for_existing_record_with_updated_at_and_custom_cache_timestamp_format,
- test_cache_key_format_is_not_too_precise,
- test_cache_key_format_is_precise_enough,
- test_named_timestamps_for_cache_key,
- test_to_param_class_method,
- test_to_param_class_method_multibyte_character,
- test_to_param_class_method_squishes,
- test_to_param_class_method_truncates,
- test_to_param_class_method_truncates_edge_case,
- test_to_param_class_method_uses_default_if_blank,
- test_to_param_class_method_uses_default_if_not_persisted,
- test_to_param_returns_id_if_not_persisted_but_id_is_set,
- test_to_param_returns_nil_if_not_persisted,
- test_to_param_should_return_string,
- test_to_param_with_no_arguments
Instance Public methods
test_cache_key_changes_when_child_touched()
Link
# File activerecord/test/cases/integration_test.rb, line 92 def test_cache_key_changes_when_child_touched owner = owners(:blackbeard) pet = pets(:parrot) owner.update_column :updated_at, Time.current key = owner.cache_key travel(1.second) do assert pet.touch end assert_not_equal key, owner.reload.cache_key end
test_cache_key_for_existing_record_is_not_timezone_dependent()
Link
test_cache_key_for_newer_updated_at()
Link
test_cache_key_for_newer_updated_on()
Link
test_cache_key_for_updated_on()
Link
test_cache_key_format_for_existing_record_with_nil_updated_timestamps()
Link
test_cache_key_format_for_existing_record_with_updated_at()
Link
test_cache_key_format_for_existing_record_with_updated_at_and_custom_cache_timestamp_format()
Link
# File activerecord/test/cases/integration_test.rb, line 87 def test_cache_key_format_for_existing_record_with_updated_at_and_custom_cache_timestamp_format dev = CachedDeveloper.first assert_equal "cached_developers/#{dev.id}-#{dev.updated_at.utc.to_s(:number)}", dev.cache_key end
test_cache_key_format_is_not_too_precise()
Link
# File activerecord/test/cases/integration_test.rb, line 137 def test_cache_key_format_is_not_too_precise skip("Subsecond precision is not supported") unless subsecond_precision_supported? dev = Developer.first dev.touch key = dev.cache_key assert_equal key, dev.reload.cache_key end
test_cache_key_format_is_precise_enough()
Link
# File activerecord/test/cases/integration_test.rb, line 129 def test_cache_key_format_is_precise_enough skip("Subsecond precision is not supported") unless subsecond_precision_supported? dev = Developer.first key = dev.cache_key dev.touch assert_not_equal key, dev.cache_key end
test_named_timestamps_for_cache_key()
Link
test_to_param_class_method()
Link
test_to_param_class_method_multibyte_character()
Link
test_to_param_class_method_squishes()
Link
test_to_param_class_method_truncates()
Link
test_to_param_class_method_truncates_edge_case()
Link
test_to_param_class_method_uses_default_if_blank()
Link
test_to_param_class_method_uses_default_if_not_persisted()
Link
test_to_param_returns_id_if_not_persisted_but_id_is_set()
Link
test_to_param_returns_nil_if_not_persisted()
Link
test_to_param_should_return_string()
Link