Sha256: cef579520f9505198e5c7df63d2bf74b5a766fc96ad6491615921337221e8815

Contents?: true

Size: 751 Bytes

Versions: 11

Compression:

Stored size: 751 Bytes

Contents

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

describe Braintree::LocalPaymentExpired do
  describe "self.new" do
    it "is protected" do
      expect do
        Braintree::LocalPaymentExpired.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",
        payment_context_id: "a-payment-context-id",
      }
      local_payment_expired = Braintree::LocalPaymentExpired._new(params)

      local_payment_expired.payment_id.should eq("a-payment-id")
      local_payment_expired.payment_context_id.should eq("a-payment-context-id")
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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