Created
June 11, 2015 16:07
-
-
Save jsqu99/e14a7e46e95f2fcebc22 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe SubscriptionCancel do | |
let(:subscription) { double("Subscription") } | |
let(:remote_subscription) { double("Local::Chargify::Subscription") } | |
subject { | |
SubscriptionCancel.new(1, ->(x) {subscription}) | |
} | |
before do | |
AppConfig.remote_subscription_fetcher= OpenStruct.new(find_by_id: remote_subscription) | |
end | |
it "cancels immediately" do | |
expect (subscription).to receive(:update_attributes) | |
subject.cancel_immediately | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment