Sha256: a29bba8bee05b8c55d530a36c9919a3ba126a8642d9c68f3befca980c0ce58b9

Contents?: true

Size: 772 Bytes

Versions: 9

Compression:

Stored size: 772 Bytes

Contents

require 'spec_helper'

describe Aptible::Billing::BillingDetail do
  describe '#can_manage_compliance?' do
    it 'should return true with compliance plan' do
      subject.stub(:plan) { 'production' }
      expect(subject.can_manage_compliance?).to be true
    end

    it 'should return false without compliance plan' do
      subject.stub(:plan) { 'platform' }
      expect(subject.can_manage_compliance?).to be false
    end
  end

  describe '#subscribed?' do
    it 'should return true with valid subscription ID' do
      subject.stub(:stripe_subscription_id) { 'sub_4YrmiVa3vMpaGA' }
      expect(subject.subscribed?).to be true
    end

    it 'should return false without valid subscription ID' do
      expect(subject.subscribed?).to be false
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
aptible-billing-1.0.1 spec/aptible/billing/billing_detail_spec.rb
aptible-billing-1.0.0 spec/aptible/billing/billing_detail_spec.rb
aptible-billing-0.1.7 spec/aptible/billing/billing_detail_spec.rb
aptible-billing-0.1.6 spec/aptible/billing/billing_detail_spec.rb
aptible-billing-0.1.5 spec/aptible/billing/billing_detail_spec.rb
aptible-billing-0.1.4 spec/aptible/billing/billing_detail_spec.rb
aptible-billing-0.1.3 spec/aptible/billing/billing_detail_spec.rb
aptible-billing-0.1.2 spec/aptible/billing/billing_detail_spec.rb
aptible-billing-0.1.1 spec/aptible/billing/billing_detail_spec.rb