Skip to content

Commit 7e04346

Browse files

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

railties/test/application/rake/dbs_test.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -510,22 +510,6 @@ def db_schema_cache_dump
510510
end
511511
end
512512

513-
test "db:schema:cache:dump ignores validation errors" do
514-
Dir.chdir(app_path) do
515-
rails "generate", "model", "book", "title:string"
516-
rails "db:migrate"
517-
rails "db:schema:cache:dump"
518-
519-
ActiveRecord::Migrator.stub(:current_version, -> { raise ActiveRecord::ActiveRecordError, "stubbed error" }) do
520-
validation_warning = capture(:stderr) do
521-
cache_tables = rails("runner", "p ActiveRecord::Base.connection.schema_cache.columns('books')", stderr: true).strip
522-
assert_includes cache_tables, "title", "expected cache_tables to include a title entry"
523-
end
524-
assert_match(/Failed to validate the schema cache because of ActiveRecord::ActiveRecordError: stubbed error/, validation_warning)
525-
end
526-
end
527-
end
528-
529513
def db_fixtures_load(expected_database)
530514
Dir.chdir(app_path) do
531515
rails "generate", "model", "book", "title:string"

0 commit comments

Comments
 (0)