Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (17 sloc) 0.711 kb
require 'spec_helper'
describe GoCardless::Subscription do
before do
GoCardless.account_details = {:app_id => 'abc', :app_secret => 'xyz',
:token => 'xxx', :merchant_id => '123'}
end
let(:client) { GoCardless.client }
let(:subscription) { GoCardless::Subscription.new(:id => '009988') }
it "should be cancellable" do
expect(client).to receive(:api_put).with('/subscriptions/009988/cancel')
subscription.cancel!
end
it_behaves_like "it has a query method for", "inactive"
it_behaves_like "it has a query method for", "active"
it_behaves_like "it has a query method for", "cancelled"
it_behaves_like "it has a query method for", "expired"
end
Jump to Line
Something went wrong with that request. Please try again.