mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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_…
This commit is contained in:
commit
d6338ad623
1 changed files with 1 additions and 6 deletions
|
@ -200,12 +200,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue