Sha256: f4c20f9fa1fad27b2763a4443d8fd5e135368acaf60c524ee9010170cbc12a1b
Contents?: true
Size: 578 Bytes
Versions: 22
Compression:
Stored size: 578 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 try_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
22 entries across 22 versions & 2 rubygems