@@ -923,34 +923,6 @@ class DefaultScopingTest < ActiveRecord::TestCase
923923 coerce_tests! :test_order_in_default_scope_should_not_prevail
924924end
925925
926- require "models/post"
927- require "models/subscriber"
928- class EachTest < ActiveRecord ::TestCase
929- # Quoting in tests does not cope with bracket quoting.
930- # TODO: Remove coerced test when https://github.com/rails/rails/pull/49269 merged.
931- coerce_tests! :test_in_batches_no_subqueries_for_whole_tables_batching
932- def test_in_batches_no_subqueries_for_whole_tables_batching_coerced
933- c = Post . connection
934- quoted_posts_id = Regexp . escape ( c . quote_table_name ( "posts.id" ) )
935- assert_sql ( /DELETE FROM #{ Regexp . escape ( c . quote_table_name ( "posts" ) ) } WHERE #{ quoted_posts_id } > .+ AND #{ quoted_posts_id } <=/i ) do
936- Post . in_batches ( of : 2 ) . delete_all
937- end
938- end
939-
940- # Quoting in tests does not cope with bracket quoting.
941- # TODO: Remove coerced test when https://github.com/rails/rails/pull/49269 merged.
942- coerce_tests! :test_in_batches_should_quote_batch_order
943- def test_in_batches_should_quote_batch_order_coerced
944- c = Post . connection
945- assert_sql ( /ORDER BY #{ Regexp . escape ( c . quote_table_name ( 'posts' ) ) } \. #{ Regexp . escape ( c . quote_column_name ( 'id' ) ) } / ) do
946- Post . in_batches ( of : 1 ) do |relation |
947- assert_kind_of ActiveRecord ::Relation , relation
948- assert_kind_of Post , relation . first
949- end
950- end
951- end
952- end
953-
954926class EagerAssociationTest < ActiveRecord ::TestCase
955927 # Use LEN() instead of LENGTH() function.
956928 coerce_tests! :test_count_with_include
@@ -2533,37 +2505,6 @@ def test_insert_all_returns_requested_sql_fields_coerced
25332505 end
25342506end
25352507
2536- class HasOneThroughDisableJoinsAssociationsTest < ActiveRecord ::TestCase
2537- # TODO: Remove coerce after Rails 7.1.0 (see https://github.com/rails/rails/pull/44051)
2538- coerce_tests! :test_disable_joins_through_with_enum_type
2539- def test_disable_joins_through_with_enum_type_coerced
2540- joins = capture_sql { @member . club }
2541- no_joins = capture_sql { @member . club_without_joins }
2542-
2543- assert_equal 1 , joins . size
2544- assert_equal 2 , no_joins . size
2545-
2546- assert_match ( /INNER JOIN/ , joins . first )
2547- no_joins . each do |nj |
2548- assert_no_match ( /INNER JOIN/ , nj )
2549- end
2550-
2551- assert_match ( /\[ memberships\] \. \[ type\] / , no_joins . first )
2552- end
2553- end
2554-
2555- class ActiveRecord ::Encryption ::EncryptableRecordTest < ActiveRecord ::EncryptionTestCase
2556- # TODO: Remove coerce after Rails 7.1.0 (see https://github.com/rails/rails/pull/44052)
2557- # Same as original but SQL Server string is varchar(4000), not varchar(255) as other adapters. Produce invalid strings with 4001 characters
2558- coerce_tests! %r{validate column sizes}
2559- test "validate column sizes coerced" do
2560- assert EncryptedAuthor . new ( name : "jorge" ) . valid?
2561- assert_not EncryptedAuthor . new ( name : "a" * 4001 ) . valid?
2562- author = EncryptedAuthor . create ( name : "a" * 4001 )
2563- assert_not author . valid?
2564- end
2565- end
2566-
25672508module ActiveRecord
25682509 class Migration
25692510 class InvalidOptionsTest < ActiveRecord ::TestCase
0 commit comments