Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added Subscription#past_due?

  • Loading branch information...
commit d78330dad27f517a940e41d2bbe7be53cf2eedfb 1 parent bfc9578
Joe Ferris jferris authored
4 lib/ashmont/subscription.rb
@@ -53,6 +53,10 @@ def reload
53 53 self
54 54 end
55 55
  56 + def past_due?
  57 + status == Braintree::Subscription::Status::PastDue
  58 + end
  59 +
56 60 private
57 61
58 62 def remote_status
8 spec/ashmont/subscription_spec.rb
@@ -171,6 +171,14 @@
171 171 subscription.status.should == "active"
172 172 end
173 173
  174 + it "is past due with a past due status" do
  175 + Ashmont::Subscription.new("xyz", :status => Braintree::Subscription::Status::PastDue).should be_past_due
  176 + end
  177 +
  178 + it "isn't past due with an active status" do
  179 + Ashmont::Subscription.new("xyz", :status => Braintree::Subscription::Status::Active).should_not be_past_due
  180 + end
  181 +
174 182 def with_configured_merchant_acount_id
175 183 merchant_account_id = "jkl"
176 184 Ashmont.merchant_account_id = merchant_account_id

0 comments on commit d78330d

Please sign in to comment.
Something went wrong with that request. Please try again.