diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-03-16 02:55:38 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-03-16 02:55:38 +0000 |
commit | e74ec90a073257b91b1760c6e05fbc632d514ca4 (patch) | |
tree | 32fea991b564e5542ca03ccc0e462c835580c7c6 /activerecord | |
parent | 7d06259be9b1b20816dd3502a0fd6f311ef6b24b (diff) | |
download | rails-e74ec90a073257b91b1760c6e05fbc632d514ca4.tar.gz rails-e74ec90a073257b91b1760c6e05fbc632d514ca4.tar.bz2 rails-e74ec90a073257b91b1760c6e05fbc632d514ca4.zip |
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
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/reflection_test.rb | 9 |
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, |