Sha256: dd6593218aa9a889e2093409d9cea4d94c5895534a5f5932f0444b96f230a003
Contents?: true
Size: 1.23 KB
Versions: 2
Compression:
Stored size: 1.23 KB
Contents
require "spec_helper" describe PayPal::Recurring::Response::Profile do context "when successful" do use_vcr_cassette "update_profile/success" let(:paypal) { PayPal::Recurring.new({ :description => "Awesome - Monthly Subscription (Updated)", :amount => "10.00", :currency => "BRL", :note => "Changed Plan", :profile_id => "I-6BWVV63V49JT" }) } subject { paypal.update_recurring_profile } it { should be_valid } its(:profile_id) { should == "I-6BWVV63V49JT" } its(:errors) { should be_empty } end context "updated profile" do use_vcr_cassette "update_profile/profile" let(:paypal) { PayPal::Recurring.new(:profile_id => "I-6BWVV63V49JT") } subject { paypal.profile } its(:amount) { should eql("10.00") } its(:description) { should eql("Awesome - Monthly Subscription (Updated)") } end context "when failure" do use_vcr_cassette("update_profile/failure") let(:paypal) { PayPal::Recurring.new({ :profile_id => "I-W4FNTE6EXJ2W", :amount => "10.00" }) } subject { paypal.update_recurring_profile } it { should_not be_valid } its(:errors) { should have(1).items } end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
didil-paypal-recurring-1.1.1 | spec/paypal/response/update_recurring_profile_spec.rb |
paypal-recurring-1.1.0 | spec/paypal/response/update_recurring_profile_spec.rb |