Sha256: b5465793473d9ead4c51af0d52391bebf5211b35b905ad2a4fe249814d88eb42

Contents?: true

Size: 723 Bytes

Versions: 5

Compression:

Stored size: 723 Bytes

Contents

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

describe Braintree::LocalPaymentCompleted do
  describe "self.new" do
    it "is protected" do
      expect do
        Braintree::LocalPaymentCompleted.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 = {
        payment_id: "a-payment-id",
        payer_id: "a-payer-id",
      }
      local_payment_completed = Braintree::LocalPaymentCompleted._new(params)

      local_payment_completed.payment_id.should eq("a-payment-id")
      local_payment_completed.payer_id.should eq("a-payer-id")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
braintree-2.95.0 spec/unit/braintree/local_payment_completed_spec.rb
braintree-2.94.0 spec/unit/braintree/local_payment_completed_spec.rb
braintree-2.93.0 spec/unit/braintree/local_payment_completed_spec.rb
braintree-2.92.0 spec/unit/braintree/local_payment_completed_spec.rb
braintree-2.91.0 spec/unit/braintree/local_payment_completed_spec.rb