test/yao/resources/test_base.rb in yao-0.13.4 vs test/yao/resources/test_base.rb in yao-0.14.0

- old
+ new

@@ -10,6 +10,17 @@ base = Yao::Resources::Base.new({"name" => "bar"}) base.class.friendly_attributes(:name) assert_equal("bar", base.name) end + + def test_map_attribute_to_resource + base = Yao::Resources::Base.new("string" => "hoge") + base.class.map_attribute_to_resource string: String + assert_equal("hoge", base.string) + + base = Yao::Resources::Base.new({"empty" => ""}) + base.class.map_attribute_to_resource empty: NilClass + assert_equal(nil, base.empty) + end + end