Sha256: 44885ce7d64eb735a5e20aa70b0ff7915f1bc5aafc8c6e5d162a5657eb04afd7

Contents?: true

Size: 544 Bytes

Versions: 7

Compression:

Stored size: 544 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe SolidusSubscriptions::InstallmentDetail, type: :model do
  it { is_expected.to validate_presence_of :installment }

  describe '#failed?' do
    subject { build(:installment_detail, success: success).failed? }

    context 'when the detail was successful' do
      let(:success) { true }

      it { is_expected.to be_falsy }
    end

    context 'when the detail was not successfuly' do
      let(:success) { false }

      it { is_expected.to be_truthy }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
solidus_subscriptions-2.0.2 spec/models/solidus_subscriptions/installment_detail_spec.rb
solidus_subscriptions-2.0.1 spec/models/solidus_subscriptions/installment_detail_spec.rb
solidus_subscriptions-2.0.0 spec/models/solidus_subscriptions/installment_detail_spec.rb
solidus_subscriptions-1.1.0 spec/models/solidus_subscriptions/installment_detail_spec.rb
solidus_subscriptions-1.0.1 spec/models/solidus_subscriptions/installment_detail_spec.rb
solidus_subscriptions-1.0.0 spec/models/solidus_subscriptions/installment_detail_spec.rb
solidus_subscriptions-1.0.0.rc1 spec/models/solidus_subscriptions/installment_detail_spec.rb