Skip to content

Commit

Permalink
Merge branch 'main' into remove-old-rubies-workarounds
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan committed Feb 12, 2025
2 parents 51d0818 + 6e287b8 commit 4dc5234
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/cases/coerced_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1948,6 +1948,20 @@ class SchemaCacheTest < ActiveRecord::TestCase
# Tests fail on Windows AppVeyor CI with 'Permission denied' error when renaming file during `File.atomic_write` call.
coerce_tests! :test_yaml_dump_and_load, :test_yaml_dump_and_load_with_gzip if RbConfig::CONFIG["host_os"] =~ /mswin|mingw/

# Cast type in SQL Server is :varchar rather than Unicode :string.
coerce_tests! :test_yaml_load_8_0_dump_without_cast_type_still_get_the_right_one
def test_yaml_load_8_0_dump_without_cast_type_still_get_the_right_one
cache = load_bound_reflection(schema_dump_8_0_path)

assert_no_queries do
columns = cache.columns_hash("courses")
assert_equal 3, columns.size
cast_type = columns["name"].fetch_cast_type(@connection)
assert_not_nil cast_type, "expected cast_type to be present"
assert_equal :varchar, cast_type.type
end
end

private

# We need to give the full paths for this to work.
Expand Down

0 comments on commit 4dc5234

Please sign in to comment.