提交 ddb4636d 编写于 作者: V Vipul A M

Add test to verify named unique index, when creating reference via add_reference

上级 39e087cb
......@@ -55,6 +55,11 @@ def test_creates_named_index
assert index_exists?(table_name, :tag_id, name: 'index_taggings_on_tag_id')
end
def test_creates_named_unique_index
add_reference table_name, :tag, index: { name: 'index_taggings_on_tag_id', unique: true }
assert index_exists?(table_name, :tag_id, name: 'index_taggings_on_tag_id', unique: true )
end
def test_creates_reference_id_with_specified_type
add_reference table_name, :user, type: :string
assert column_exists?(table_name, :user_id, :string)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册