Sha256: 65b0fa936292f66ee345de3f55493c3c896d38e84451e1bcd250d5cedeaf08ab
Contents?: true
Size: 767 Bytes
Versions: 1
Compression:
Stored size: 767 Bytes
Contents
require 'spec_helper' describe StripeLocal::Customer do let(:response) { File.read("./spec/webhook_fixtures/customer_creation_response.json") } let(:stripe_customer) { Stripe::StripeObject.construct_from(MultiJson.load(response)) } let(:client) { ::Client.create( name: "Test Case", email: "test@test.com", password: "password" ) } it "can normalize a customer on create" do Stripe::Customer.should_receive( :create ).and_return stripe_customer stripe_customer.should_receive :update_subscription StripeLocal::Customer.should_receive( :create ).with( stripe_customer ).and_call_original StripeLocal::Customer.should_receive( :normalize ).with( stripe_customer ).and_call_original client.signup( card: "token", plan: "plan" ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
stripe_local-0.0.2 | spec/models/stripe_local/customer_spec.rb |