Skip to content

Commit 2f78649

Browse files
committed
fix(test): test_create_fixtures would corrupt foreign keys
1 parent 01aeef2 commit 2f78649

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

test/cases/fixtures_test.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,6 @@ def test_auto_value_on_primary_key
122122
assert_equal fixtures, result.to_a
123123
end
124124

125-
# This replaces the same test that's been excluded from
126-
# FixturesTest. The test is exactly the same, but the tables
127-
# under test will have primary key sequences, and the connection is from ActiveRecord::Base.
128-
# Normally, the primary keys would use CockroachDB's unique_rowid().
129-
def test_create_fixtures
130-
fixtures = ActiveRecord::FixtureSet.create_fixtures(FIXTURES_ROOT, "parrots")
131-
assert Parrot.find_by_name("Curious George"), "George is not in the database"
132-
assert fixtures.detect { |f| f.name == "parrots" }, "no fixtures named 'parrots' in #{fixtures.map(&:name).inspect}"
133-
end
134-
135125
# This replaces the same test that's been excluded from
136126
# FixturesTest. The test is exactly the same, but the tables
137127
# under test will have primary key sequences, and the connection is from ActiveRecord::Base.

test/excludes/FixturesTest.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
exclude :test_bulk_insert_with_a_multi_statement_query_in_a_nested_transaction, "Skipping until we can triage further. See https://github.com/cockroachdb/activerecord-cockroachdb-adapter/issues/48"
33
exclude :test_clean_fixtures, "Skipping the PostgreSQL test, but reimplemented for CockroachDB in test/cases/fixtures_test.rb"
44
exclude :test_auto_value_on_primary_key, "Skipping the PostgreSQL test, but reimplemented for CockroachDB in test/cases/fixtures_test.rb"
5-
exclude :test_create_fixtures, "Skipping the PostgreSQL test, but reimplemented for CockroachDB in test/cases/fixtures_test.rb"
65
exclude :test_multiple_clean_fixtures, "Skipping the PostgreSQL test, but reimplemented for CockroachDB in test/cases/fixtures_test.rb"
76
exclude :test_bulk_insert_with_a_multi_statement_query_raises_an_exception_when_any_insert_fails, "Skipping the PostgreSQL test, but reimplemented for CockroachDB in test/cases/fixtures_test.rb"
87
exclude :test_inserts_with_pre_and_suffix, "Skipping the PostgreSQL test, but reimplemented for CockroachDB in test/cases/fixtures_test.rb"

0 commit comments

Comments
 (0)