spec/integration/braintree/customer_spec.rb in braintree-4.20.0 vs spec/integration/braintree/customer_spec.rb in braintree-4.21.0

- old
+ new

@@ -36,10 +36,11 @@ :first_name => "Bill", :last_name => "Gates", :company => "Microsoft", :email => "bill@microsoft.com", :phone => "312.555.1234", + :international_phone => {:country_code => "1", :national_number => "3121234567"}, :fax => "614.555.5678", :website => "www.microsoft.com", :tax_identifiers => [{:country_code => "US", :identifier => "987654321"}], ) expect(result.success?).to eq(true) @@ -47,10 +48,12 @@ expect(result.customer.first_name).to eq("Bill") expect(result.customer.last_name).to eq("Gates") expect(result.customer.company).to eq("Microsoft") expect(result.customer.email).to eq("bill@microsoft.com") expect(result.customer.phone).to eq("312.555.1234") + expect(result.customer.international_phone[:country_code]).to eq("1") + expect(result.customer.international_phone[:national_number]).to eq("3121234567") expect(result.customer.fax).to eq("614.555.5678") expect(result.customer.website).to eq("www.microsoft.com") expect(result.customer.created_at.between?(Time.now - 10, Time.now)).to eq(true) expect(result.customer.updated_at.between?(Time.now - 10, Time.now)).to eq(true) end @@ -1191,17 +1194,20 @@ ) result = Braintree::Customer.update( customer.id, :first_name => "Mr. Joe", :last_name => "Super Cool", + :international_phone => {:country_code => "1", :national_number => "3121234567"}, :custom_fields => { :store_me => "a value" }, ) expect(result.success?).to eq(true) expect(result.customer.id).to eq(customer.id) expect(result.customer.first_name).to eq("Mr. Joe") expect(result.customer.last_name).to eq("Super Cool") + expect(result.customer.international_phone[:country_code]).to eq("1") + expect(result.customer.international_phone[:national_number]).to eq("3121234567") expect(result.customer.custom_fields[:store_me]).to eq("a value") end it "does not update customer with duplicate payment method if fail_on_payment_method option set" do customer = Braintree::Customer.create!(