diff options
author | Marc-Andre Lafortune <github@marc-andre.ca> | 2011-03-05 16:25:20 -0500 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-07-11 19:47:57 -0300 |
commit | eeb58b0934f646847b3220e3db270bc6b9148919 (patch) | |
tree | 854843083040b7f91606ac33f77bd7bd756178a4 /railties/test | |
parent | 1939fa3f169e4c44234aef0f336411fc01d0445f (diff) | |
download | rails-eeb58b0934f646847b3220e3db270bc6b9148919.tar.gz rails-eeb58b0934f646847b3220e3db270bc6b9148919.tar.bz2 rails-eeb58b0934f646847b3220e3db270bc6b9148919.zip |
Generate valid default fixtures for models with a type column
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/generated_attribute_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/railties/test/generators/generated_attribute_test.rb b/railties/test/generators/generated_attribute_test.rb index c9f8ab0a7b..a85829085c 100644 --- a/railties/test/generators/generated_attribute_test.rb +++ b/railties/test/generators/generated_attribute_test.rb @@ -68,6 +68,11 @@ class GeneratedAttributeTest < Rails::Generators::TestCase assert_field_default_value :string, 'MyString' end + def test_default_value_for_type + att = Rails::Generators::GeneratedAttribute.new("type", "string") + assert_equal("", att.default) + end + def test_default_value_is_text assert_field_default_value :text, 'MyText' end |