Skip to content

Commit 080c980

Browse files
committed
Coerce test as cast type in SQL Server is varchar
1 parent 6f89d22 commit 080c980

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/cases/coerced_tests.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,20 @@ def test_marshal_dump_and_load_via_disk_coerced
19611961
end
19621962
end
19631963

1964+
# Cast type in SQL Server is :varchar rather than Unicode :string.
1965+
coerce_tests! :test_yaml_load_8_0_dump_without_cast_type_still_get_the_right_one
1966+
def test_yaml_load_8_0_dump_without_cast_type_still_get_the_right_one
1967+
cache = load_bound_reflection(schema_dump_8_0_path)
1968+
1969+
assert_no_queries do
1970+
columns = cache.columns_hash("courses")
1971+
assert_equal 3, columns.size
1972+
cast_type = columns["name"].fetch_cast_type(@connection)
1973+
assert_not_nil cast_type, "expected cast_type to be present"
1974+
assert_equal :varchar, cast_type.type
1975+
end
1976+
end
1977+
19641978
private
19651979

19661980
def with_marshable_time_defaults

0 commit comments

Comments
 (0)