Sha256: 2fe2555afc020275c16c1950d6cd7cf96219519137b5f6293d8578006753c6a0

Contents?: true

Size: 677 Bytes

Versions: 27

Compression:

Stored size: 677 Bytes

Contents

require 'spec_helper'

describe 'taxons', type: :feature, caching: true do
  let!(:taxonomy) { create(:taxonomy) }
  let!(:taxon) { create(:taxon, taxonomy: taxonomy) }

  before do
    # warm up the cache
    visit spree.root_path
    assert_written_to_cache("views/en/spree/taxonomies/#{taxonomy.id}")
    assert_written_to_cache("views/en/taxons/#{taxon.updated_at.utc.to_i}")

    clear_cache_events
  end

  it "busts the cache when max_level_in_taxons_menu conf changes" do
    Spree::Config[:max_level_in_taxons_menu] = 5
    visit spree.root_path
    assert_written_to_cache("views/en/spree/taxonomies/#{taxonomy.id}")
    expect(cache_writes.count).to eq(1)
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
solidus_frontend-2.1.1 spec/features/caching/taxons_spec.rb
solidus_frontend-2.0.3 spec/features/caching/taxons_spec.rb
solidus_frontend-1.4.2 spec/features/caching/taxons_spec.rb
solidus_frontend-1.3.2 spec/features/caching/taxons_spec.rb
spree_frontend-3.3.0.rc1 spec/features/caching/taxons_spec.rb
solidus_frontend-2.0.2 spec/features/caching/taxons_spec.rb
solidus_frontend-1.4.1 spec/features/caching/taxons_spec.rb
spree_frontend-3.2.1 spec/features/caching/taxons_spec.rb
spree_frontend-3.2.0 spec/features/caching/taxons_spec.rb
spree_frontend-3.2.0.rc3 spec/features/caching/taxons_spec.rb
solidus_frontend-2.1.0 spec/features/caching/taxons_spec.rb
solidus_frontend-2.1.0.rc1 spec/features/caching/taxons_spec.rb
solidus_frontend-2.0.1 spec/features/caching/taxons_spec.rb
spree_frontend-3.2.0.rc2 spec/features/caching/taxons_spec.rb
spree_frontend-3.2.0.rc1 spec/features/caching/taxons_spec.rb
solidus_frontend-2.1.0.beta1 spec/features/caching/taxons_spec.rb
solidus_frontend-2.0.0 spec/features/caching/taxons_spec.rb
solidus_frontend-1.4.0 spec/features/caching/taxons_spec.rb
solidus_frontend-2.0.0.rc1 spec/features/caching/taxons_spec.rb
solidus_frontend-1.4.0.rc1 spec/features/caching/taxons_spec.rb