提交 8f290092 编写于 作者: Y yuuji.yaginuma

return correct type from `EnumType`

上级 48f896cd
......@@ -105,6 +105,8 @@ def inherited(base) # :nodoc:
end
class EnumType < Type::Value # :nodoc:
delegate :type, to: :subtype
def initialize(name, mapping, subtype)
@name = name
@mapping = mapping
......
......@@ -421,4 +421,8 @@ def self.name; 'Book'; end
book = Book.new
assert book.hard?
end
test "data type of Enum type" do
assert_equal :integer, Book.type_for_attribute('status').type
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册