Sha256: 779ca56e156b6b8c3cf18bf50a8b0b198d74be116a8b7fcf6b09add11e7c4145

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")

describe Braintree::VenmoProfileData do
  describe "self.new" do
    it "is protected" do
      expect do
        Braintree::VenmoProfileData.new
      end.to raise_error(NoMethodError, /protected method .new/)
    end
  end

  describe "self._new" do
    it "initializes the object with the appropriate attributes set" do

      params = {
        username: "a-username",
        first_name: "a-first-name",
        last_name: "a-last-name",
        phone_number: "12312312343",
        email: "a-email",
      }

      payment_method_customer_data_updated = Braintree::VenmoProfileData._new(params)

      payment_method_customer_data_updated.username.should eq("a-username")
      payment_method_customer_data_updated.first_name.should eq("a-first-name")
      payment_method_customer_data_updated.last_name.should eq("a-last-name")
      payment_method_customer_data_updated.phone_number.should eq("12312312343")
      payment_method_customer_data_updated.email.should eq("a-email")
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
braintree-4.14.0 spec/unit/braintree/venmo_profile_data_spec.rb
braintree-4.13.0 spec/unit/braintree/venmo_profile_data_spec.rb
braintree-4.12.0 spec/unit/braintree/venmo_profile_data_spec.rb
braintree-4.11.0 spec/unit/braintree/venmo_profile_data_spec.rb
braintree-4.10.0 spec/unit/braintree/venmo_profile_data_spec.rb
braintree-4.9.0 spec/unit/braintree/venmo_profile_data_spec.rb
braintree-4.8.0 spec/unit/braintree/venmo_profile_data_spec.rb
braintree-4.7.0 spec/unit/braintree/venmo_profile_data_spec.rb
braintree-4.6.0 spec/unit/braintree/venmo_profile_data_spec.rb