Sha256: aec28c7dd4626f31749b4d3bfe389489391b562020e95ff70e29f1b0857acfce
Contents?: true
Size: 577 Bytes
Versions: 10
Compression:
Stored size: 577 Bytes
Contents
require 'spec_helper' RSpec.describe Hyrax::AdminController do describe '#show' do let(:service) { instance_double(Hyrax::AdminSetService, search_results_with_work_count: results) } let(:results) { instance_double(Array) } before do expect(controller).to receive(:authorize!).with(:read, :admin_dashboard).and_return(true) allow(Hyrax::AdminSetService).to receive(:new).and_return(service) end it "is successful" do get :show expect(response).to be_success expect(assigns[:admin_set_rows]).to eq results end end end
Version data entries
10 entries across 10 versions & 2 rubygems