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