提交 a74414c3 编写于 作者: R Ryuta Kamizono

Add a test for primary key should be not null

上级 b884ee6f
......@@ -228,9 +228,10 @@ class Barcode < ActiveRecord::Base
def test_any_type_primary_key
assert_equal "code", Barcode.primary_key
column_type = Barcode.type_for_attribute(Barcode.primary_key)
assert_equal :string, column_type.type
assert_equal 42, column_type.limit
column = Barcode.column_for_attribute(Barcode.primary_key)
assert_not column.null unless current_adapter?(:SQLite3Adapter)
assert_equal :string, column.type
assert_equal 42, column.limit
end
test "schema dump primary key includes type and options" do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册