Sha256: a589f9df7f321f9a801c4c6d2a6e2fd53b22b4ccf4778dd7d426e0fdff88d47a

Contents?: true

Size: 551 Bytes

Versions: 13

Compression:

Stored size: 551 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)
    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_devise_token_auth-2.8.0.alpha.14 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.13 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.12 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.11 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.10 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.9 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.8 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.7 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.6 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.5 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.4 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.3 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend_devise_token_auth-2.8.0.alpha.2 spec/controllers/spree/taxons_controller_spec.rb