Skip to content

Commit

Permalink
Don't accept params to delete_customer because Stripe accepts none
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-stripe committed May 5, 2012
1 parent 5921076 commit 065f231
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/stripe.rb
Expand Up @@ -369,8 +369,8 @@ def update_subscription(params)
subscription
end

def delete_discount(params={})
Stripe.request(:delete, discount_url, @api_key, params)
def delete_discount
Stripe.request(:delete, discount_url, @api_key)
refresh_from({ :discount => nil }, api_key, true)
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_stripe.rb
Expand Up @@ -318,7 +318,7 @@ class TestStripeRuby < Test::Unit::TestCase
@mock.expects(:get).once.returns(test_response(test_customer))
c = Stripe::Customer.retrieve("test_customer")

@mock.expects(:delete).once.with("https://api.stripe.com/v1/customers/c_test_customer/discount", {}, nil).returns(test_response(test_delete_discount_response))
@mock.expects(:delete).once.with("https://api.stripe.com/v1/customers/c_test_customer/discount", nil, nil).returns(test_response(test_delete_discount_response))
s = c.delete_discount
end
end
Expand Down

0 comments on commit 065f231

Please sign in to comment.