Sha256: d7391249642cd40eae7e19d5f7f3fd404498ca59d3c733c5c422be3700142924
Contents?: true
Size: 858 Bytes
Versions: 32
Compression:
Stored size: 858 Bytes
Contents
require 'spec_helper' require 'spree/core/product_filters' describe 'product filters', type: :model do # Regression test for https://github.com/spree/spree/issues/1709 context 'finds products filtered by brand' do let(:product) { create(:product) } before do Spree::Property.create!(name: "brand", presentation: "brand") product.set_property("brand", "Nike") end it "does not attempt to call value method on Arel::Table" do Spree::Core::ProductFilters.brand_filter end it "can find products in the 'Nike' brand" do expect(Spree::Product.brand_any("Nike")).to include(product) end it "sorts products without brand specified" do product.set_property("brand", "Nike") create(:product).set_property("brand", nil) Spree::Core::ProductFilters.brand_filter[:labels] end end end
Version data entries
32 entries across 32 versions & 1 rubygems