Sha256: 1c0c2c97fb4ce13f7ddee8bfee0b92638f3ed523016285a0a7ac4690f3db21df

Contents?: true

Size: 574 Bytes

Versions: 13

Compression:

Stored size: 574 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 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

13 entries across 13 versions & 1 rubygems

Version Path
solidus_frontend-2.6.6 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.7.4 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.7.3 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.6.5 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.7.2 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.6.4 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.6.3 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.7.1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.6.2 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.7.0 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.6.1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.6.0 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-2.6.0.rc1 spec/controllers/spree/taxons_controller_spec.rb