提交 e74ec90a 编写于 作者: R Rick Olson

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
上级 7d06259b
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册