Sha256: d9c0e32b298b7c6cd00fe389ecdcf4d6fe75d38b8fb4bc5c9aa0f45411fe5220

Contents?: true

Size: 683 Bytes

Versions: 9

Compression:

Stored size: 683 Bytes

Contents

require 'spec_helper'
describe Spree::Search::Searchkick do
  let(:product) { create(:product) }

  before do
    product.reindex
    Spree::Product.reindex
  end

  describe 'configure' do
    before do
      Spree::Search::Searchkick.configure do |config|
        config.configurable_attribute = true
      end
    end

    it "allows configurable_attribute to be configured" do
      expect(Spree::Search::Searchkick.configuration.configurable_attribute).to be_truthy
    end
  end

  describe "#retrieve_products" do
    it "returns matching products" do
      products = Spree::Search::Searchkick.new({}).retrieve_products
      expect(products.count).to eq 1
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
solidus_searchkick-0.3.4 spec/lib/spree/search/searchkick_spec.rb
solidus_searchkick-0.3.3 spec/lib/spree/search/searchkick_spec.rb
solidus_searchkick-0.3.2 spec/lib/spree/search/searchkick_spec.rb
solidus_searchkick-0.3.1 spec/lib/spree/search/searchkick_spec.rb
solidus_searchkick-0.3.0 spec/lib/spree/search/searchkick_spec.rb
solidus_searchkick-0.2.3 spec/lib/spree/search/searchkick_spec.rb
solidus_searchkick-0.2.2 spec/lib/spree/search/searchkick_spec.rb
solidus_searchkick-0.2.1 spec/lib/spree/search/searchkick_spec.rb
solidus_searchkick-0.2 spec/lib/spree/search/searchkick_spec.rb