提交 1d96915b 编写于 作者: R Rafael Mendonça França

Merge pull request #15566 from kuldeepaggarwal/fix-build

fix test cases after #15558 merge to master.
......@@ -49,7 +49,7 @@ def type_cast(value)
end
test "undecorated columns are not touched" do
Model.property :another_string, Type::String.new, default: 'something or other'
Model.attribute :another_string, Type::String.new, default: 'something or other'
Model.decorate_attribute_type(:a_string, :test) { |t| StringDecorator.new(t) }
assert_equal 'something or other', Model.new.another_string
......@@ -84,7 +84,7 @@ def type_cast(value)
end
test "decorating attributes does not modify parent classes" do
Model.property :another_string, Type::String.new, default: 'whatever'
Model.attribute :another_string, Type::String.new, default: 'whatever'
Model.decorate_attribute_type(:a_string, :test) { |t| StringDecorator.new(t) }
child_class = Class.new(Model)
child_class.decorate_attribute_type(:another_string, :test) { |t| StringDecorator.new(t) }
......@@ -101,7 +101,7 @@ def type_cast(value)
end
test "defaults are decorated on the column" do
Model.property :a_string, Type::String.new, default: 'whatever'
Model.attribute :a_string, Type::String.new, default: 'whatever'
Model.decorate_attribute_type(:a_string, :test) { |t| StringDecorator.new(t) }
column = Model.columns_hash['a_string']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册