Sha256: fcf01153907ff1c496af6ba98ac31e3d3710ea6413fdf80b3981d8425a34523c

Contents?: true

Size: 537 Bytes

Versions: 12

Compression:

Stored size: 537 Bytes

Contents

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)
    spree_get :show, id: taxon.permalink
    expect(response.status).to eq(200)
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
solidus_frontend-1.3.2 spec/controllers/spree/taxons_controller_spec.rb
spree_frontend-3.3.0.rc1 spec/controllers/spree/taxons_controller_spec.rb
spree_frontend-3.2.1 spec/controllers/spree/taxons_controller_spec.rb
spree_frontend-3.2.0 spec/controllers/spree/taxons_controller_spec.rb
spree_frontend-3.2.0.rc3 spec/controllers/spree/taxons_controller_spec.rb
spree_frontend-3.2.0.rc2 spec/controllers/spree/taxons_controller_spec.rb
spree_frontend-3.2.0.rc1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-1.3.1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-1.3.0 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-1.3.0.rc2 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-1.3.0.rc1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-1.3.0.beta1 spec/controllers/spree/taxons_controller_spec.rb