Skip to content

Commit

Permalink
Removed coerced tests that are no longer in Rails
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan committed Sep 14, 2023
1 parent e6173d4 commit 32a9c8c
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions test/cases/coerced_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,38 +106,6 @@ def test_doesnt_error_when_a_select_query_has_encoding_errors_coerced
end
end

module ActiveRecord
class AdapterPreventWritesLegacyTest < ActiveRecord::TestCase
# Fix randomly failing test. The loading of the model's schema was affecting the test.
coerce_tests! :test_errors_when_an_insert_query_is_called_while_preventing_writes
def test_errors_when_an_insert_query_is_called_while_preventing_writes_coerced
Subscriber.send(:load_schema!)
original_test_errors_when_an_insert_query_is_called_while_preventing_writes
end

# Fix randomly failing test. The loading of the model's schema was affecting the test.
coerce_tests! :test_errors_when_an_insert_query_prefixed_by_a_slash_star_comment_is_called_while_preventing_writes
def test_errors_when_an_insert_query_prefixed_by_a_slash_star_comment_is_called_while_preventing_writes_coerced
Subscriber.send(:load_schema!)
original_test_errors_when_an_insert_query_prefixed_by_a_slash_star_comment_is_called_while_preventing_writes
end

# Fix randomly failing test. The loading of the model's schema was affecting the test.
coerce_tests! :test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_is_called_while_preventing_writes
def test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_is_called_while_preventing_writes_coerced
Subscriber.send(:load_schema!)
original_test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_is_called_while_preventing_writes
end

# Fix randomly failing test. The loading of the model's schema was affecting the test.
coerce_tests! :test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_containing_read_command_is_called_while_preventing_writes
def test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_containing_read_command_is_called_while_preventing_writes_coerced
Subscriber.send(:load_schema!)
original_test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_containing_read_command_is_called_while_preventing_writes
end
end
end

module ActiveRecord
class AdapterTestWithoutTransaction < ActiveRecord::TestCase
# SQL Server does not allow truncation of tables that are referenced by foreign key
Expand Down Expand Up @@ -513,7 +481,7 @@ def test_distinct_count_all_with_custom_select_and_order_coerced

# Leave it up to users to format selects/functions so HAVING works correctly.
coerce_tests! :test_having_with_strong_parameters

# SELECT columns must be in the GROUP clause. Since since `ids` only selects the primary key you cannot perform this query in SQL Server.
coerce_tests! :test_ids_with_includes_and_non_primary_key_order
end
Expand Down

0 comments on commit 32a9c8c

Please sign in to comment.