test/answer/parser/base_test.rb in whois-1.1.1 vs test/answer/parser/base_test.rb in whois-1.1.2
- old
+ new
@@ -49,18 +49,18 @@
parser = @klass.new(@part)
assert_equal [], parser.contacts
end
def test_contacts_should_return_all_supported_contacts
- c1 = "1st"
- c2 = "2nd"
- c3 = "3rd"
+ c1 = Whois::Answer::Contact.new(:id => "1st", :name => "foo")
+ c2 = Whois::Answer::Contact.new(:id => "2nd", :name => "foo")
+ c3 = Whois::Answer::Contact.new(:id => "3rd", :name => "foo")
klass = Class.new(@klass) do
register_property(:registrant_contact, :supported) { [c1, c2] }
register_property(:admin_contact, :supported) { nil }
register_property(:technical_contact, :supported) { c3 }
end
- assert_equal [c1, c2, c3], klass.new(@part).contacts
+ assert_equal ["1st", "2nd", "3rd"], klass.new(@part).contacts.map(&:id)
end
def test_self_property_registry
assert_instance_of Hash, @klass.property_registry
\ No newline at end of file