From e74ec90a073257b91b1760c6e05fbc632d514ca4 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Thu, 16 Mar 2006 02:55:38 +0000 Subject: added test checking that NOT NULL is properly reflected on [nathaniel@talbott.ws] closes #4125 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/reflection_test.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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, -- cgit v1.2.3