mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use assert_nil
if value
is nil in assert_field_default_value
It is deprecate to specify nil for expect argument of `assert_equal`.
Ref: 922bc9151a
This commit is contained in:
parent
5fd50c387b
commit
1a2fc2eb7b
1 changed files with 5 additions and 1 deletions
|
@ -113,7 +113,11 @@ module Rails
|
|||
#
|
||||
# assert_field_default_value :string, "MyString"
|
||||
def assert_field_default_value(attribute_type, value)
|
||||
assert_equal(value, create_generated_attribute(attribute_type).default)
|
||||
if value.nil?
|
||||
assert_nil(create_generated_attribute(attribute_type).default)
|
||||
else
|
||||
assert_equal(value, create_generated_attribute(attribute_type).default)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue