Skip to content

Commit

Permalink
Removed tests that no longer need to be coerced
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan committed Dec 11, 2024
1 parent 6ddb035 commit ecd3486
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions test/cases/coerced_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2200,35 +2200,6 @@ class EnumTest < ActiveRecord::TestCase
end
end

require "models/task"
class QueryCacheExpiryTest < ActiveRecord::TestCase
# SQL Server does not support skipping or upserting duplicates.
coerce_tests! :test_insert_all
def test_insert_all_coerced
assert_raises(ArgumentError, /does not support skipping duplicates/) do
Task.cache { Task.insert({ starting: Time.now }) }
end

assert_raises(ArgumentError, /does not support upsert/) do
Task.cache { Task.upsert({ starting: Time.now }) }
end

assert_raises(ArgumentError, /does not support upsert/) do
Task.cache { Task.upsert_all([{ starting: Time.now }]) }
end

Task.cache do
assert_called(ActiveRecord::Base.connection_pool.query_cache, :clear, times: 1) do
Task.insert_all!([ starting: Time.now ])
end

assert_called(ActiveRecord::Base.connection_pool.query_cache, :clear, times: 1) do
Task.insert!({ starting: Time.now })
end
end
end
end

require "models/citation"
class EagerLoadingTooManyIdsTest < ActiveRecord::TestCase
fixtures :citations
Expand Down

0 comments on commit ecd3486

Please sign in to comment.