stripe_local 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +4 -1
- data/app/models/stripe_local/customer.rb +10 -45
- data/lib/stripe_local.rb +43 -23
- data/lib/stripe_local/version.rb +1 -1
- data/spec/dummy/log/test.log +8796 -0
- data/spec/models/stripe_local/customer_spec.rb +5 -3
- data/spec/webhook_fixtures/customer_creation_response.json +1 -1
- metadata +1 -1
@@ -9,9 +9,11 @@ describe StripeLocal::Customer do
|
|
9
9
|
it "can normalize a customer on create" do
|
10
10
|
Stripe::Customer.should_receive( :create ).and_return stripe_customer
|
11
11
|
stripe_customer.should_receive :update_subscription
|
12
|
-
StripeLocal::Customer.should_receive( :create ).
|
13
|
-
StripeLocal::Customer.should_receive( :normalize ).
|
14
|
-
client.signup( card: "token", plan: "plan" )
|
12
|
+
StripeLocal::Customer.should_receive( :create ).and_call_original
|
13
|
+
StripeLocal::Customer.should_receive( :normalize ).and_call_original
|
14
|
+
client.signup( {card: "token", plan: "plan"} )
|
15
|
+
|
16
|
+
client.reload.customer.id.should eq "cus_123"
|
15
17
|
end
|
16
18
|
|
17
19
|
it "refers to StripeLocal mattr_accessor for application level model_class" do
|