Skip to content

Instantly share code, notes, and snippets.

/gist:0661a0e821ae907de0e3 Secret

Created Jul 24, 2013
Embed
What would you like to do?
Subscription
#create_stripe_customer
stripe customer record
description
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] Initialized with options: {:record=>:once, :match_requests_on=>[:method, :uri], :allow_unused_http_interactions=>true, :serialize_with=>:json, :persist_with=>:file_system}
[webmock] Handling request: [post https://api.stripe.com/v1/customers] (disabled: false)
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] Initialized HTTPInteractionList with request matchers [:method, :uri] and 32 interaction(s): { [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374024379,\n \"id\": \"cus_2DA10mmNbVSntr\","], [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374024379,\n \"id\": \"cus_2DA10mmNbVSntr\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374026100,\n \"id\": \"cus_2DAUnS710hfkAR\","], [get https://api.stripe.com/v1/customers/cus_2DAUnS710hfkAR] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374026100,\n \"id\": \"cus_2DAUnS710hfkAR\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374027344,\n \"id\": \"cus_2DAp0cDhEicOLH\","], [get https://api.stripe.com/v1/customers/cus_2DAp0cDhEicOLH] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374027344,\n \"id\": \"cus_2DAp0cDhEicOLH\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374053831,\n \"id\": \"cus_2DHwmEtjfW5Nui\","], [get https://api.stripe.com/v1/customers/cus_2DHwmEtjfW5Nui] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374053831,\n \"id\": \"cus_2DHwmEtjfW5Nui\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374094423,\n \"id\": \"cus_2DSrgp9wnDL4Xt\","], [get https://api.stripe.com/v1/customers/cus_2DSrgp9wnDL4Xt] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374094423,\n \"id\": \"cus_2DSrgp9wnDL4Xt\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374122822,\n \"id\": \"cus_2DaUeIAuii8toi\","], [get https://api.stripe.com/v1/customers/cus_2DaUeIAuii8toi] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374122822,\n \"id\": \"cus_2DaUeIAuii8toi\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374169383,\n \"id\": \"cus_2Dn0ChJJlayQQz\","], [get https://api.stripe.com/v1/customers/cus_2Dn0ChJJlayQQz] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374169383,\n \"id\": \"cus_2Dn0ChJJlayQQz\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374170433,\n \"id\": \"cus_2DnIbwuEKxAKUq\","], [get https://api.stripe.com/v1/customers/cus_2DnIbwuEKxAKUq] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374170433,\n \"id\": \"cus_2DnIbwuEKxAKUq\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374179344,\n \"id\": \"cus_2Dpgzr4ClaEqZi\","], [get https://api.stripe.com/v1/customers/cus_2Dpgzr4ClaEqZi] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374179344,\n \"id\": \"cus_2Dpgzr4ClaEqZi\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374195518,\n \"id\": \"cus_2Du2AMiiCRJqa9\","], [get https://api.stripe.com/v1/customers/cus_2Du2AMiiCRJqa9] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374195518,\n \"id\": \"cus_2Du2AMiiCRJqa9\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374200558,\n \"id\": \"cus_2DvOWj9FbN6f96\","], [get https://api.stripe.com/v1/customers/cus_2DvOWj9FbN6f96] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374200558,\n \"id\": \"cus_2DvOWj9FbN6f96\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374521423,\n \"id\": \"cus_2FJepazPV4li0m\","], [get https://api.stripe.com/v1/customers/cus_2FJepazPV4li0m] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374521423,\n \"id\": \"cus_2FJepazPV4li0m\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374660038,\n \"id\": \"cus_2FuuYlgFLmWlVt\","], [get https://api.stripe.com/v1/customers/cus_2FuuYlgFLmWlVt] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374660038,\n \"id\": \"cus_2FuuYlgFLmWlVt\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374702256,\n \"id\": \"cus_2G6FEh4kmTJEq9\","], [get https://api.stripe.com/v1/customers/cus_2G6FEh4kmTJEq9] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374702256,\n \"id\": \"cus_2G6FEh4kmTJEq9\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374702340,\n \"id\": \"cus_2G6HOxBE1C344p\","], [get https://api.stripe.com/v1/customers/cus_2G6HOxBE1C344p] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374702340,\n \"id\": \"cus_2G6HOxBE1C344p\","], [post https://api.stripe.com/v1/customers] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374702635,\n \"id\": \"cus_2G6M5A96fcGSyl\","], [get https://api.stripe.com/v1/customers/cus_2G6M5A96fcGSyl] => [200 "{\n \"object\": \"customer\",\n \"created\": 1374702635,\n \"id\": \"cus_2G6M5A96fcGSyl\","] }
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] Checking if [post https://api.stripe.com/v1/customers] matches [post https://api.stripe.com/v1/customers] using [:method, :uri]
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] method (matched): current request [post https://api.stripe.com/v1/customers] vs [post https://api.stripe.com/v1/customers]
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] uri (matched): current request [post https://api.stripe.com/v1/customers] vs [post https://api.stripe.com/v1/customers]
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] Found matching interaction for [post https://api.stripe.com/v1/customers] at index 0: [200 "{\n \"object\": \"customer\",\n \"created\": 1374024379,\n \"id\": \"cus_2DA10mmNbVSntr\","]
[webmock] Identified request type (stubbed_by_vcr) for [post https://api.stripe.com/v1/customers]
[webmock] Handling request: [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr] (disabled: false)
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] Checking if [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr] matches [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr] using [:method, :uri]
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] method (matched): current request [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr] vs [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr]
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] uri (matched): current request [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr] vs [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr]
[Cassette: 'Subscription/#create_stripe_customer/stripe customer record/description/'] Found matching interaction for [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr] at index 0: [200 "{\n \"object\": \"customer\",\n \"created\": 1374024379,\n \"id\": \"cus_2DA10mmNbVSntr\","]
[webmock] Identified request type (stubbed_by_vcr) for [get https://api.stripe.com/v1/customers/cus_2DA10mmNbVSntr]
should == "1" (FAILED - 1)
Failures:
1) Subscription#create_stripe_customer stripe customer record description
Failure/Error: its(:description) { should == "#{user.id}" }
expected: "1"
got: "145" (using ==)
# ./spec/models/subscription_spec.rb:32:in `block (4 levels) in <top (required)>'
# -e:1:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment