Sha256: 6e4cf5239eb5f27e2c281d1d110dc1fe933fb341bfb13b71e7b4d863af681b95
Contents?: true
Size: 632 Bytes
Versions: 3
Compression:
Stored size: 632 Bytes
Contents
require 'spec_helper' module Susply describe CancelSubscription do it "updates deactivated at with the current time" do subscription = create(:susply_subscription, deactivated_at: nil) s = Susply::CancelSubscription.call(subscription) expect(s.deactivated_at).to be_within(1.second).of(Time.zone.now) end it "does not updates deactivated at when its already cancelled" do time = Time.zone.now - 3.days subscription = create(:susply_subscription, deactivated_at: time) s = Susply::CancelSubscription.call(subscription) expect(s.deactivated_at).to eq time end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
susply-1.0.0 | spec/services/susply/cancel_subscription_spec.rb |
susply-0.0.2 | spec/services/susply/cancel_subscription_spec.rb |
susply-0.0.1 | spec/services/susply/cancel_subscription_spec.rb |