Sha256: dfff989766d7b67d1d47dfe8f89f2241cd233303f52e325dfaa584fceed1469d

Contents?: true

Size: 531 Bytes

Versions: 32

Compression:

Stored size: 531 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

32 entries across 32 versions & 1 rubygems

Version Path
solidus_core-2.3.1 spec/helpers/taxons_helper_spec.rb
solidus_core-2.2.2 spec/helpers/taxons_helper_spec.rb
solidus_core-2.1.1 spec/helpers/taxons_helper_spec.rb
solidus_core-2.0.3 spec/helpers/taxons_helper_spec.rb
solidus_core-1.4.2 spec/helpers/taxons_helper_spec.rb
solidus_core-1.3.2 spec/helpers/taxons_helper_spec.rb
solidus_core-2.3.0 spec/helpers/taxons_helper_spec.rb
solidus_core-2.3.0.rc3 spec/helpers/taxons_helper_spec.rb
solidus_core-2.3.0.rc2 spec/helpers/taxons_helper_spec.rb
solidus_core-2.3.0.rc1 spec/helpers/taxons_helper_spec.rb
solidus_core-2.3.0.beta1 spec/helpers/taxons_helper_spec.rb
solidus_core-2.0.2 spec/helpers/taxons_helper_spec.rb
solidus_core-1.4.1 spec/helpers/taxons_helper_spec.rb
solidus_core-2.2.1 spec/helpers/taxons_helper_spec.rb
solidus_core-2.2.0 spec/helpers/taxons_helper_spec.rb
solidus_core-2.2.0.rc1 spec/helpers/taxons_helper_spec.rb
solidus_core-2.2.0.beta1 spec/helpers/taxons_helper_spec.rb
solidus_core-2.1.0 spec/helpers/taxons_helper_spec.rb
solidus_core-2.1.0.rc1 spec/helpers/taxons_helper_spec.rb
solidus_core-2.0.1 spec/helpers/taxons_helper_spec.rb