未验证 提交 d6338ad6 编写于 作者: Y Yuji Yaginuma 提交者: GitHub

Merge pull request #31194 from yahonda/attributes_before_type_cast_on_boolean_with_jruby

No difference between JRuby and CRuby at test_read_attributes_before_…
......@@ -200,12 +200,7 @@ def setup
if current_adapter?(:Mysql2Adapter)
test "read attributes_before_type_cast on a boolean" do
bool = Boolean.create!("value" => false)
if RUBY_PLATFORM.include?("java")
# JRuby will return the value before typecast as string.
assert_equal "0", bool.reload.attributes_before_type_cast["value"]
else
assert_equal 0, bool.reload.attributes_before_type_cast["value"]
end
assert_equal 0, bool.reload.attributes_before_type_cast["value"]
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册