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
Ryuta Kamizono e450a4a497 Fix average on decimal and enum attributes
Follow up to #40351 and #41418.

This fixes `average` on decimal and enum (on integer in general)
attributes to not do `type.deserialize`.

The precision and the scale on the column might be lower than the
calculated result.

And also, mapping the calculated result to enum label is quite
meaningless, the mapping result is almost nil.
2021-02-13 15:07:48 +09:00
..
adapters Increment @counter of prepared postgres statements prior to running the query. 2021-02-11 12:41:21 +01:00
arel Remove all version checking for older Rubies in tests 2021-02-05 13:21:45 +09:00
associations Avoid stack level too deep in predicate builder 2021-02-11 11:32:20 -05:00
attribute_methods
coders
connection_adapters Expose primary_abstract_class public API 2021-01-27 15:01:59 -05:00
database_configurations
fixture_set
migration Remove all version checking for older Rubies in tests 2021-02-05 13:21:45 +09:00
relation Remove require "active_support/core_ext/symbol/starts_ends_with" 2021-02-09 22:31:09 +09:00
scoping Merge pull request #41394 from afrase/recursive-association-fix 2021-02-11 18:32:52 -05:00
tasks Show a warning when running no migration using SCOPE 2021-01-26 15:05:35 +01:00
type Address warning: Passing only keyword arguments 2021-02-02 21:59:08 +09:00
validations Merge pull request #41115 from ghiculescu/failing-test-on-ruby-master 2021-01-14 13:32:16 -05:00
adapter_prevent_writes_test.rb Clean up preventing writes tests 2020-11-09 11:57:13 -05:00
adapter_test.rb Allow Adapter#select_all to be performed asynchronously from a background thread pool 2021-02-08 19:17:52 +01:00
aggregations_test.rb
annotate_test.rb
ar_schema_test.rb PostgreSQL: handle timestamp with time zone columns correctly in schema.rb 2021-02-10 10:59:31 -07:00
associations_test.rb Batch Preloader::Association queries having the same scope 2021-02-09 14:05:42 -05:00
attribute_methods_test.rb Make ActiveRecord::AttributeMethods::Query respect getter overwrites in the model 2020-12-28 16:47:56 -03:00
attributes_test.rb attribute should not require a connection is established 2021-02-02 15:04:23 +09:00
autosave_association_test.rb Methods with association name are defined as public methods 2020-10-02 22:22:10 +09:00
base_prevent_writes_test.rb Clean up preventing writes tests 2020-11-09 11:57:13 -05:00
base_test.rb Fix string quotes 2021-02-11 22:52:20 +00:00
batches_test.rb Return rows affected from batched update_all and delete_all 2020-10-03 18:27:26 +01:00
binary_test.rb
bind_parameter_test.rb Fix unprepared_statement to work it when nesting 2021-02-12 22:47:27 +09:00
boolean_test.rb
cache_key_test.rb
calculations_test.rb Fix average on decimal and enum attributes 2021-02-13 15:07:48 +09:00
callbacks_test.rb Remove require "active_support/core_ext/symbol/starts_ends_with" 2021-02-09 22:31:09 +09:00
clone_test.rb
collection_cache_key_test.rb
column_alias_test.rb
column_definition_test.rb
comment_test.rb feat(rubocop): Add Style/RedundantRegexpEscape 2020-12-08 18:57:09 +00:00
connection_management_test.rb Allow Adapter#select_all to be performed asynchronously from a background thread pool 2021-02-08 19:17:52 +01:00
connection_pool_test.rb Fix preventing writes for ApplicationRecord 2021-01-06 09:19:19 -05:00
core_test.rb
counter_cache_test.rb
custom_locking_test.rb
database_configurations_test.rb Remove deprecated methods from ActiveRecord::DatabaseConfigurations 2020-10-30 00:25:37 +00:00
database_selector_test.rb
database_statements_test.rb
date_test.rb
date_time_precision_test.rb
date_time_test.rb
defaults_test.rb
delegated_type_test.rb Allow delegated_type to be specified primary_key and foreign_key 2020-12-18 15:06:16 +09:00
dirty_test.rb
disconnected_test.rb Revert "Merge pull request #19881 from sikachu/silence-mysql-errno-warning" 2020-09-14 14:02:45 +09:00
dup_test.rb Add option for default_scope to run on all queries 2020-12-01 11:15:08 -05:00
enum_test.rb Fix enum predicate methods on object enum keys 2021-02-02 12:46:19 +09:00
errors_test.rb
explain_subscriber_test.rb
explain_test.rb
filter_attributes_test.rb Remove all version checking for older Rubies in tests 2021-02-05 13:21:45 +09:00
finder_respond_to_test.rb
finder_test.rb Handle Relations with having clauses in #include? 2021-02-12 01:04:39 +01:00
fixtures_test.rb Raise if connection_handlers is called in legacy_connection_handling 2020-11-17 08:38:05 -05:00
forbidden_attributes_protection_test.rb
habtm_destroy_order_test.rb
helper.rb Implement granular role and shard swapping 2020-10-28 15:11:35 -04:00
hot_compatibility_test.rb
i18n_test.rb
inheritance_test.rb Avoid stack level too deep in predicate builder 2021-02-11 11:32:20 -05:00
insert_all_test.rb Don't over protect the MySQL users on insert_all 2020-11-04 20:26:22 +00:00
instrumentation_test.rb Set payload name for calculation queries 2021-01-02 08:52:41 +00:00
integration_test.rb
invalid_connection_test.rb
invertible_migration_test.rb Allow adding nonnamed expression indexes to be revertible 2020-12-11 18:24:45 +02:00
json_attribute_test.rb
json_serialization_test.rb
json_shared_test_cases.rb
locking_test.rb Restore the ability that update/destroy optimistic locking object without default 2021-01-12 09:27:11 +09:00
log_subscriber_test.rb
marshal_serialization_test.rb
migration_test.rb Merge pull request #40806 from eileencodes/make-migration-context-public 2021-02-10 15:14:43 -05:00
migrator_test.rb
mixin_test.rb
modules_test.rb Module#const_set is a public method 2020-09-15 17:19:37 +09:00
multi_db_migrator_test.rb
multiparameter_attributes_test.rb
multiple_db_test.rb
nested_attributes_test.rb Association setter methods are defined as public methods 2020-10-02 22:22:10 +09:00
nested_attributes_with_callbacks_test.rb Methods with association name are defined as public methods 2020-10-02 22:22:10 +09:00
null_relation_test.rb
numeric_data_test.rb
persistence_test.rb Remove deprecated ActiveRecord::Base#update_attributes and ActiveRecord::Base#update_attributes! 2020-10-30 00:25:40 +00:00
pooled_connections_test.rb
prepared_statement_status_test.rb
primary_class_test.rb Expose primary_abstract_class public API 2021-01-27 15:01:59 -05:00
primary_keys_test.rb
query_cache_test.rb Raise if connection_handlers is called in legacy_connection_handling 2020-11-17 08:38:05 -05:00
quoting_test.rb
readonly_test.rb
reaper_test.rb Fix preventing writes for ApplicationRecord 2021-01-06 09:19:19 -05:00
reflection_test.rb Use Enumerator#all? and Enumerator#any? with classes instead of iterations 2021-02-07 01:29:50 -05:00
relation_test.rb Avoid query from exists? on contradictory relation 2020-10-14 12:30:10 -07:00
relations_test.rb Allow build multiple records even on non association relation 2021-02-08 21:48:27 +09:00
reload_models_test.rb
reserved_word_test.rb
result_test.rb Remove deprecated ActiveRecord::Result#to_hash method 2020-10-30 00:25:33 +00:00
sanitize_test.rb
schema_dumper_test.rb PostgreSQL: handle timestamp with time zone columns correctly in schema.rb 2021-02-10 10:59:31 -07:00
schema_loading_test.rb
secure_token_test.rb
serialization_test.rb to_json and from_json are public methods 2020-10-02 22:22:10 +09:00
serialized_attribute_test.rb Allow serialize attribute on alias_attribute 2021-02-08 20:47:19 +09:00
signed_id_test.rb Add more tests for find_signed/! methods 2020-10-30 12:34:54 +02:00
statement_cache_test.rb
statement_invalid_test.rb
store_test.rb
strict_loading_test.rb Allow to opt-out of strict_loading mode on a per-record base. 2021-01-20 15:41:13 +01:00
suppressor_test.rb
test_case.rb
test_databases_test.rb
test_fixtures_test.rb Fix spelling 2020-12-27 04:09:49 +10:00
time_precision_test.rb
timestamp_test.rb
touch_later_test.rb
transaction_callbacks_test.rb Make sure the :if options of callbacks is not mutated 2020-12-29 03:56:54 +00:00
transaction_isolation_test.rb
transactions_test.rb Ensure the connection used in a failed rollback is discarded 2020-11-04 17:01:07 -05:00
type_test.rb attribute should not require a connection is established 2021-02-02 15:04:23 +09:00
types_test.rb
unconnected_test.rb
unsafe_raw_sql_test.rb Remove deprecated support for using unsafe raw SQL in ActiveRecord::Relation methods 2020-10-30 00:25:32 +00:00
validations_repair_helper.rb
validations_test.rb Exercise tests on decimal attribute values 2021-01-14 17:21:25 +09:00
view_test.rb
yaml_serialization_test.rb