Sha256: 8929ac047684c9adc43bf7c3eb5f1556f643ef84b83faca317959aeef0539e78

Contents?: true

Size: 534 Bytes

Versions: 7

Compression:

Stored size: 534 Bytes

Contents

require 'spec_helper'

describe Spree::TaxonsHelper, :type => :helper do
  # Regression test for https://github.com/spree/spree/issues/4382
  it "#taxon_preview" do
    taxon = create(:taxon)
    child_taxon = create(:taxon, parent: taxon)
    product_1 = create(:product)
    product_2 = create(:product)
    product_3 = create(:product)
    taxon.products << product_1
    taxon.products << product_2
    child_taxon.products << product_3

    expect(taxon_preview(taxon.reload)).to eql([product_1, product_2, product_3])
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
solidus_core-1.2.3 spec/helpers/taxons_helper_spec.rb
solidus_core-1.2.2 spec/helpers/taxons_helper_spec.rb
solidus_core-1.2.1 spec/helpers/taxons_helper_spec.rb
solidus_core-1.2.0 spec/helpers/taxons_helper_spec.rb
solidus_core-1.2.0.rc2 spec/helpers/taxons_helper_spec.rb
solidus_core-1.2.0.rc1 spec/helpers/taxons_helper_spec.rb
solidus_core-1.2.0.beta1 spec/helpers/taxons_helper_spec.rb