Skip to content

Commit 559c8e5

Browse files
committed
Update coerced_tests.rb
1 parent ef9edf2 commit 559c8e5

File tree

1 file changed

+5
-33
lines changed

1 file changed

+5
-33
lines changed

test/cases/coerced_tests.rb

+5-33
Original file line numberDiff line numberDiff line change
@@ -243,25 +243,6 @@ def test_update_date_time_attributes_with_default_timezone_local
243243
end
244244
end
245245

246-
class HasManyThroughAssociationsTest < ActiveRecord::TestCase
247-
# SQL Server does not have query for release_savepoint
248-
coerce_tests! :test_associate_existing
249-
def test_associate_existing_coerced
250-
post = posts(:thinking)
251-
person = people(:david)
252-
253-
assert_queries_count(2) do
254-
post.people << person
255-
end
256-
257-
assert_queries_count(1) do
258-
assert_includes post.people, person
259-
end
260-
261-
assert_includes post.reload.people.reload, person
262-
end
263-
end
264-
265246
class BelongsToAssociationsTest < ActiveRecord::TestCase
266247
# Since @client.firm is a single first/top, and we use FETCH the order clause is used.
267248
coerce_tests! :test_belongs_to_does_not_use_order_by
@@ -1335,18 +1316,6 @@ def test_registering_new_handlers_for_association_coerced
13351316
end
13361317
end
13371318

1338-
class PrimaryKeysTest < ActiveRecord::TestCase
1339-
# SQL Server does not have query for release_savepoint
1340-
coerce_tests! :test_create_without_primary_key_no_extra_query
1341-
def test_create_without_primary_key_no_extra_query_coerced
1342-
klass = Class.new(ActiveRecord::Base) do
1343-
self.table_name = "dashboards"
1344-
end
1345-
klass.create! # warmup schema cache
1346-
assert_queries_count(2, include_schema: true) { klass.create! }
1347-
end
1348-
end
1349-
13501319
require "models/task"
13511320
class QueryCacheTest < ActiveRecord::TestCase
13521321
# SQL Server adapter not in list of supported adapters in original test.
@@ -1633,8 +1602,11 @@ def test_releasing_named_savepoints_coerced
16331602

16341603
Topic.lease_connection.create_savepoint("another")
16351604
Topic.lease_connection.release_savepoint("another")
1636-
# We do not have a notion of releasing, so this does nothing vs raise an error.
1637-
Topic.lease_connection.release_savepoint("another")
1605+
1606+
# We do not have a notion of releasing, so this does nothing and doesn't raise an error.
1607+
assert_nothing_raised do
1608+
Topic.lease_connection.release_savepoint("another")
1609+
end
16381610
end
16391611
end
16401612

0 commit comments

Comments
 (0)