aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/defaults_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/defaults_test.rb b/activerecord/test/defaults_test.rb
index 3043871f77..cf99978f9e 100644
--- a/activerecord/test/defaults_test.rb
+++ b/activerecord/test/defaults_test.rb
@@ -35,6 +35,12 @@ class DefaultTest < Test::Unit::TestCase
assert !klass.columns_hash['omit'].null
assert_raise(ActiveRecord::StatementInvalid) { klass.create! }
+
+ assert_nothing_raised do
+ instance = klass.create!(:omit => 1)
+ assert_equal 0, instance.zero
+ assert_equal 1, instance.omit
+ end
ensure
klass.connection.drop_table(klass.table_name) rescue nil
end