Sha256: eb07a8b91fb2c48d9b03c1d3b89094a548ddad87b78668cb54819be35bf0cc28

Contents?: true

Size: 767 Bytes

Versions: 48

Compression:

Stored size: 767 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'
require 'spree/testing_support/factories/promotion_factory'

RSpec.describe 'promotion code factory' do
  let(:factory_class) { Spree::Promotion }

  describe 'plain promotion' do
    let(:factory) { :promotion }

    it_behaves_like 'a working factory'
  end

  describe 'promotion with item adjustment' do
    let(:factory) { :promotion_with_item_adjustment }

    it_behaves_like 'a working factory'
  end

  describe 'promotion with order adjustment' do
    let(:factory) { :promotion_with_order_adjustment }

    it_behaves_like 'a working factory'
  end

  describe 'promotion with item total rule' do
    let(:factory) { :promotion_with_item_total_rule }

    it_behaves_like 'a working factory'
  end
end

Version data entries

48 entries across 48 versions & 2 rubygems

Version Path
solidus_core-2.10.5 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.10.3 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.10.2 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.9.6 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.8.6 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.10.1 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.9.5 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.10.0 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.9.4 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.6.6 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.7.4 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.8.5 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.9.3 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.9.2 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.10.0.beta1 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.7.3 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.6.5 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.9.1 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.9.0 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb
solidus_core-2.9.0.rc.1 spec/lib/spree/core/testing_support/factories/promotion_factory_spec.rb