aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/reflection_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/reflection_test.rb')
-rw-r--r--activerecord/test/reflection_test.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/reflection_test.rb b/activerecord/test/reflection_test.rb
index 27cb40ee4d..9b70762a5a 100644
--- a/activerecord/test/reflection_test.rb
+++ b/activerecord/test/reflection_test.rb
@@ -3,14 +3,21 @@ require 'fixtures/topic'
require 'fixtures/customer'
require 'fixtures/company'
require 'fixtures/company_in_module'
+require 'fixtures/subscriber'
class ReflectionTest < Test::Unit::TestCase
- fixtures :topics, :customers, :companies
+ fixtures :topics, :customers, :companies, :subscribers
def setup
@first = Topic.find(1)
end
+ def test_column_null_not_null
+ subscriber = Subscriber.find(:first)
+ assert subscriber.column_for_attribute("name").null
+ assert !subscriber.column_for_attribute("nick").null
+ end
+
def test_read_attribute_names
assert_equal(
%w( id title author_name author_email_address bonus_time written_on last_read content approved replies_count parent_id type ).sort,