Skip to content

Commit 38e3cff

Browse files
committed
Test no longer need to be coerced
1 parent 4e9ad8a commit 38e3cff

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

test/cases/coerced_tests.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ def test_errors_when_an_insert_query_prefixed_by_a_double_dash_comment_is_called
9696
def test_doesnt_error_when_a_select_query_has_encoding_errors_coerced
9797
ActiveRecord::Base.while_preventing_writes do
9898
# TinyTDS fail on encoding errors.
99-
# But at least we can assert it fails in the client and not before when trying to
100-
# match the query.
99+
# But at least we can assert it fails in the client and not before when trying to match the query.
101100
assert_raises ActiveRecord::StatementInvalid do
102101
@connection.select_all("SELECT '\xC8'")
103102
end
@@ -1396,15 +1395,6 @@ def test_does_not_duplicate_optimizer_hints_on_merge_coerced
13961395
query = Post.optimizer_hints("OMGHINT").merge(Post.optimizer_hints("OMGHINT")).to_sql
13971396
assert_equal expected, query
13981397
end
1399-
1400-
# Workaround for randomly failing test. Ordering of results not guaranteed.
1401-
# TODO: Remove coerced test when https://github.com/rails/rails/pull/44168 merged.
1402-
coerce_tests! :test_select_quotes_when_using_from_clause
1403-
def test_select_quotes_when_using_from_clause_coerced
1404-
quoted_join = ActiveRecord::Base.connection.quote_table_name("join")
1405-
selected = Post.select(:join).from(Post.select("id as #{quoted_join}")).map(&:join)
1406-
assert_equal Post.pluck(:id).sort, selected.sort
1407-
end
14081398
end
14091399
end
14101400

0 commit comments

Comments
 (0)