Sha256: f4c20f9fa1fad27b2763a4443d8fd5e135368acaf60c524ee9010170cbc12a1b

Contents?: true

Size: 578 Bytes

Versions: 22

Compression:

Stored size: 578 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Spree::TaxonsController, type: :controller do
  it "should provide the current user to the searcher class" do
    taxon = create(:taxon, permalink: "test")
    user = mock_model(Spree.user_class, last_incomplete_spree_order: nil, spree_api_key: 'fake')
    allow(controller).to receive_messages try_spree_current_user: user
    expect_any_instance_of(Spree::Config.searcher_class).to receive(:current_user=).with(user)
    get :show, params: { id: taxon.permalink }
    expect(response.status).to eq(200)
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
solidus_frontend-2.10.5 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.10.3 spec/controllers/spree/taxons_controller_spec.rb
solidus_starter_frontend-0.1.0 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.10.2 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.9.6 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.8.6 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.10.1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.9.5 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.10.0 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.9.4 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.8.5 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.9.3 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.9.2 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.10.0.beta1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.9.1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.9.0 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.9.0.rc.1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.8.4 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.8.3 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.8.2 spec/controllers/spree/taxons_controller_spec.rb