spec/ppl/adapter/vcard/vpim_spec.rb in ppl-1.9.0 vs spec/ppl/adapter/vcard/vpim_spec.rb in ppl-1.10.0
- old
+ new
@@ -21,16 +21,16 @@
@contact.email_addresses = ["john@example.org"]
@adapter.encode(@contact).should include("EMAIL:john@example.org")
end
it "should encode the contact's phone number" do
- @contact.phone_number = "01234567890"
+ @contact.phone_numbers.push("01234567890")
@adapter.encode(@contact).should include("TEL:01234567890")
end
it "should encode the contact's organization" do
- @contact.organization = "Example Ltd"
+ @contact.organizations.push("Example Ltd")
@adapter.encode(@contact).should include("ORG:Example Ltd")
end
it "should encode the contact's street address" do
@contact.postal_address = Ppl::Entity::PostalAddress.new
@@ -136,11 +136,11 @@
"VERSION:3.0",
"TEL:01234567890",
"END:VCARD",
].join("\n")
contact = @adapter.decode(vcard)
- contact.phone_number.should eq "01234567890"
+ contact.phone_numbers.first.should eq "01234567890"
end
it "should decode the contact's organization" do
vcard = [
"BEGIN:VCARD",
@@ -148,10 +148,10 @@
"VERSION:3.0",
"ORG:Example Ltd",
"END:VCARD",
].join("\n")
contact = @adapter.decode(vcard)
- contact.organization.should eq "Example Ltd"
+ contact.organizations.first.should eq "Example Ltd"
end
it "should decode the contact's street address" do
vcard = [
"BEGIN:VCARD",