spec/unit/chargify/subscription_spec.rb in jsmestad-chargify-0.3.0 vs spec/unit/chargify/subscription_spec.rb in jsmestad-chargify-0.3.1
- old
+ new
@@ -7,9 +7,19 @@
config[:api_key] = 'OU812'
config[:subdomain] = 'pengwynn'
end
end
+ describe '.all' do
+
+ it "should return a list of products" do
+ stub_get "https://OU812:x@pengwynn.chargify.com/subscriptions.json", "subscriptions.json"
+ subscription = Chargify::Subscription.all
+ subscription.first.customer.reference.should == 'bradleyjoyce'
+ end
+
+ end
+
describe '.find!' do
it "should return info for a subscription" do
stub_get "https://OU812:x@pengwynn.chargify.com/subscriptions/13.json", "subscription.json"
subscription = Chargify::Subscription.find!(13)