Permalink
Browse files

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
  • Loading branch information...
1 parent 7d06259 commit e74ec90a073257b91b1760c6e05fbc632d514ca4 @technoweenie technoweenie committed Mar 16, 2006
Showing with 8 additions and 1 deletion.
  1. +8 −1 activerecord/test/reflection_test.rb
@@ -3,14 +3,21 @@
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,

0 comments on commit e74ec90

Please sign in to comment.