Sha256: b6a39b9998485a7670a767f0d7bf047cd067e6dbdcc2151207563a75ab365d75
Contents?: true
Size: 975 Bytes
Versions: 1
Compression:
Stored size: 975 Bytes
Contents
require "spec_helper" describe PayPal::ExpressCheckout::Payment do describe "#details" do context "when successful" do use_vcr_cassette "express_checkout/payment/details/success" let(:transaction_id) { "14R798164A671130B" } let(:payment) { PayPal::ExpressCheckout::Payment.new(:transaction_id => transaction_id) } subject { payment.details } its(:valid?) { should be_true } its(:errors) { should be_empty } its(:payment_items) { should have(2).item } it "should have the correct items" do subject.payment_items.first.amount.should eql("1150.00") subject.payment_items.last.amount.should eql("1350.00") end end context "when failure" do use_vcr_cassette "express_checkout/payment/details/failure" let(:payment) { PayPal::ExpressCheckout::Payment.new(:transaction_id => "aaa") } subject { payment.details } its(:errors) { should have(1).items } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
paypal-payment-0.1.2 | spec/paypal/express_checkout/payment/transaction_details_spec.rb |