Sha256: 69f69cc455a0b5d5f901403152e81ef687fb9b3e474e2600dc6b41b6c0881f85

Contents?: true

Size: 531 Bytes

Versions: 5

Compression:

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_frontend-1.4.2 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-1.4.1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-1.4.0 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-1.4.0.rc1 spec/controllers/spree/taxons_controller_spec.rb
solidus_frontend-1.4.0.beta1 spec/controllers/spree/taxons_controller_spec.rb