test/entity_test.rb in ruby-xcdm-0.0.6 vs test/entity_test.rb in ruby-xcdm-0.0.7
- old
+ new
@@ -43,9 +43,14 @@
def test_property_default
e.integer32 'count', default: 1
assert_equal [{ optional: 'YES', syncable: 'YES', attributeType: 'Integer 32', name: 'count', defaultValueString: '1' }], e.properties
end
+ def test_property_default_nil
+ e.integer32 'count', default: nil
+ assert_equal [{ optional: 'YES', syncable: 'YES', attributeType: 'Integer 32', name: 'count' }], e.properties
+ end
+
def test_convert_type
assert_equal 'Integer 16', Entity.convert_type(:integer16)
assert_equal 'Integer 32', Entity.convert_type(:integer32)
assert_equal 'Integer 64', Entity.convert_type(:integer64)
assert_equal 'Decimal', Entity.convert_type(:decimal)