rails/activerecord/test/cases/associations
Jonathan Hefner 7f5deeeee6 Fix flakey destroyed_by_association tests
Example failure: https://buildkite.com/rails/rails/builds/68661#84f8790a-fc9e-42ef-a7fb-5bd15a489de8/1002-1012

The failing `destroyed_by_association` tests create an author (a
DestroyByParentAuthor) and a book (a DestroyByParentBook) that belongs
to that author.  If the database already contains books that refer to
that author's ID from previous tests (i.e. tests that disabled
`use_transactional_tests`), then one of those books will be loaded and
destroyed instead of the intended DestroyByParentBook book.

By loading the `:books` fixtures, we ensure the database does not
contain such unexpected books.

Co-authored-by: Eugene Kenny <elkenny@gmail.com>
Co-authored-by: Ryuta Kamizono <kamipo@gmail.com>
2020-05-04 19:26:54 -05:00
..
belongs_to_associations_test.rb *_for_alter methods should also takes keyword arguments 2020-01-20 09:15:29 +09:00
bidirectional_destroy_dependencies_test.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
callbacks_test.rb Fix typo in test name 2020-03-21 20:58:56 +09:00
cascaded_eager_loading_test.rb Avoid extraneous preloading when loading across has_one associations 2020-01-08 08:14:04 +13:00
eager_load_includes_full_sti_class_test.rb Fix CI failure due to remaining tagging records 2019-03-26 12:59:16 +09:00
eager_load_nested_include_test.rb Fix EagerLoadPolyAssocsTest setup (#38883) 2020-04-07 10:14:17 +09:00
eager_singularization_test.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
eager_test.rb Merge pull request #39057 from kamipo/deprecate_in_clause_length 2020-04-27 15:34:29 +09:00
extension_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
has_and_belongs_to_many_associations_test.rb Fix join middle table alias when using HABTM 2019-07-26 23:12:44 +09:00
has_many_associations_test.rb Fix unscoping association scope on joins not to raise an error 2020-04-16 00:34:41 +09:00
has_many_through_associations_test.rb Sort results to fix nondeterministic test failures 2020-03-29 05:30:25 +01:00
has_one_associations_test.rb Fix flakey destroyed_by_association tests 2020-05-04 19:26:54 -05:00
has_one_through_associations_test.rb More exercise singular association query 2018-11-28 03:34:20 +09:00
inner_join_association_test.rb Maintain eager loading joining order as before 2019-09-18 17:42:15 +09:00
inverse_associations_test.rb Fix: on accessing the parent record before creation with has_many_inversing adds two records to association 2020-02-20 09:26:47 +01:00
join_model_test.rb Replace assert ! with assert_not 2018-04-19 08:11:33 -04:00
left_outer_join_association_test.rb Fix merging left_joins to maintain its own join_type context 2019-04-27 21:43:57 +09:00
nested_through_associations_test.rb Fix random CI failure due to non-deterministic order 2020-05-01 15:00:01 +09:00
required_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00