test/hash_test.rb in openwferu-0.9.16 vs test/hash_test.rb in openwferu-0.9.17
- old
+ new
@@ -40,11 +40,11 @@
wi0 = OpenWFE::InFlowWorkItem.new
wi0.fei = new_fei
h = wi0.to_h
- #require 'pp'; pp h
+ #p h
wi1 = OpenWFE::InFlowWorkItem.from_h(h)
assert_equal wi0.fei, wi1.fei
assert_equal wi0.attributes.length, wi1.attributes.length
@@ -55,21 +55,21 @@
assert_equal wi0.attributes.length, wi2.attributes.length
end
def test_any_from_h
- li = OpenWFE::LaunchItem.new()
+ li = OpenWFE::LaunchItem.new
li.workflow_definition_url = "http://www.openwfe.org/nada"
li.price = "USD 12"
li.customer = "Captain Nemo"
h = li.to_h
- #require 'pp'; pp h
+ #p h
- li1 = OpenWFE::workitem_from_h(h)
+ li1 = OpenWFE::workitem_from_h h
- assert li1.is_a?(OpenWFE::LaunchItem)
- assert_equal li1.price, "USD 12"
- assert_equal li1.attributes.size, 3
+ assert_kind_of OpenWFE::LaunchItem, li1
+ assert_equal "USD 12", li1.price
+ assert_equal 3, li1.attributes.size
end
end