Sha256: a18ee2b4253dfaf15e100e4ab8477962057d2234f78b1b8b941671f37f79d455

Contents?: true

Size: 759 Bytes

Versions: 9

Compression:

Stored size: 759 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)

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
braintree-4.23.0 spec/unit/braintree/local_payment_expired_spec.rb
braintree-4.22.0 spec/unit/braintree/local_payment_expired_spec.rb
braintree-4.21.0 spec/unit/braintree/local_payment_expired_spec.rb
braintree-4.20.0 spec/unit/braintree/local_payment_expired_spec.rb
braintree-4.19.0 spec/unit/braintree/local_payment_expired_spec.rb
braintree-4.18.0 spec/unit/braintree/local_payment_expired_spec.rb
braintree-4.17.0 spec/unit/braintree/local_payment_expired_spec.rb
braintree-4.16.0 spec/unit/braintree/local_payment_expired_spec.rb
braintree-4.15.0 spec/unit/braintree/local_payment_expired_spec.rb