Sha256: 5f679f137527a1553efe4dcf2d9e814a3e88e08a2978c804adfa128dfa3bf6ee

Contents?: true

Size: 528 Bytes

Versions: 11

Compression:

Stored size: 528 Bytes

Contents

require 'spec_helper'

describe StripeLocal::Subscription do
  let(:response) { File.read("./spec/webhook_fixtures/customer.subscription.created.json") }
  let(:subscription) { Stripe::StripeObject.construct_from(MultiJson.load(response)) }

  it "can normalize attributes from Stripe on create" do
    s = StripeLocal::Subscription.create( subscription )
    s.plan_id.should eq "HR99"
    s.customer_id.should eq "cus_2vIuZmAfWK89Yk"
    s.status.should eq "active"
    s.start.should eq "2013-11-11 15:32:46 -0600"
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
stripe_local-0.2.5 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.2.4 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.2.3 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.2.2 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.2.1 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.2.0 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.1.3 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.1.2 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.1.1 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.1.0 spec/models/stripe_local/subscription_spec.rb
stripe_local-0.0.2 spec/models/stripe_local/subscription_spec.rb