File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1948,6 +1948,20 @@ class SchemaCacheTest < ActiveRecord::TestCase
19481948 # Tests fail on Windows AppVeyor CI with 'Permission denied' error when renaming file during `File.atomic_write` call.
19491949 coerce_tests! :test_yaml_dump_and_load , :test_yaml_dump_and_load_with_gzip if RbConfig ::CONFIG [ "host_os" ] =~ /mswin|mingw/
19501950
1951+ # Cast type in SQL Server is :varchar rather than Unicode :string.
1952+ coerce_tests! :test_yaml_load_8_0_dump_without_cast_type_still_get_the_right_one
1953+ def test_yaml_load_8_0_dump_without_cast_type_still_get_the_right_one
1954+ cache = load_bound_reflection ( schema_dump_8_0_path )
1955+
1956+ assert_no_queries do
1957+ columns = cache . columns_hash ( "courses" )
1958+ assert_equal 3 , columns . size
1959+ cast_type = columns [ "name" ] . fetch_cast_type ( @connection )
1960+ assert_not_nil cast_type , "expected cast_type to be present"
1961+ assert_equal :varchar , cast_type . type
1962+ end
1963+ end
1964+
19511965 private
19521966
19531967 # We need to give the full paths for this to work.
You can’t perform that action at this time.
0 commit comments