Sha256: 56e07f34130520de78e174d4382c73e590e467eff00300182a6074e42a224599
Contents?: true
Size: 576 Bytes
Versions: 7
Compression:
Stored size: 576 Bytes
Contents
require 'spec_helper' RSpec.describe Sufia::AdminController do describe '#show' do let(:service) { instance_double(Sufia::AdminSetService, search_results_with_work_count: results) } let(:results) { instance_double(Array) } before do allow(controller).to receive(:authorize!).with(:read, :admin_dashboard).and_return(true) allow(Sufia::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
7 entries across 7 versions & 1 rubygems