Sha256: 90717c0389246b9fc196cd5f8a2d6892b5c3058905501c343a5acbf891828df7
Contents?: true
Size: 1 KB
Versions: 2
Compression:
Stored size: 1 KB
Contents
require 'spec_helper' describe CatarseStripe::Processors::Stripe do context "process stripe details_for response" do let(:backer) { Factory(:backer, confirmed: false) } it "should create a new payment_notifications for backer" do backer.payment_notifications.should be_empty subject.process!(backer, paypal_details_response) backer.payment_notifications.should_not be_empty end it "should fill extra_data with all response data" do subject.process!(backer, stripe_details_response) backer.payment_notifications.first.extra_data.should == stripe_details_response end it "should confirm backer when checkout status is completed" do subject.process!(backer, stripe_details_response) backer.confirmed.should be_true end it "should not confirm when checkout status is not completed" do subject.process!(backer, stripe_details_response.merge!({"checkout_status" => "just_another_status"}) ) backer.confirmed.should be_false end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
catarse_stripe-0.1.0.0.1 | spec/lib/processors/stripe_spec.rb |
catarse_stripe-0.1.0 | spec/lib/processors/stripe_spec.rb |