Sha256: 196123d9f543d493625a56b7b953c9a4ac9858ee2600cc037aa83830e15696b4

Contents?: true

Size: 604 Bytes

Versions: 32

Compression:

Stored size: 604 Bytes

Contents

require 'spec_helper'

class FakesController < ApplicationController
  include Spree::Core::ControllerHelpers::Search
end

describe Spree::Core::ControllerHelpers::Search, type: :controller do
  controller(FakesController) {}

  describe '#build_searcher' do
    it 'returns Spree::Core::Search::Base instance' do
      allow(controller).to receive_messages(
        try_spree_current_user: create(:user),
        current_pricing_options: Spree::Config.pricing_options_class.new(currency: 'USD')
      )
      expect(controller.build_searcher({}).class).to eq Spree::Core::Search::Base
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
solidus_core-2.3.1 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.2.2 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.1.1 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.0.3 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-1.4.2 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-1.3.2 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.3.0 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.3.0.rc3 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.3.0.rc2 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.3.0.rc1 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.3.0.beta1 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.0.2 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-1.4.1 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.2.1 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.2.0 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.2.0.rc1 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.2.0.beta1 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.1.0 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.1.0.rc1 spec/lib/spree/core/controller_helpers/search_spec.rb
solidus_core-2.0.1 spec/lib/spree/core/controller_helpers/search_spec.rb