require 'spec_helper' RSpec.describe "curation_concerns/base/file_manager.html.erb" do let(:members) { [file_set, member] } let(:file_set) { CurationConcerns::FileSetPresenter.new(solr_doc, nil) } let(:member) { CurationConcerns::WorkShowPresenter.new(solr_doc_work, nil) } let(:solr_doc) do SolrDocument.new( resource.to_solr.merge( id: "test", title_tesim: "Test", thumbnail_path_ss: "/test/image/path.jpg", label_tesim: ["file_name.tif"] ) ) end let(:solr_doc_work) do SolrDocument.new( resource.to_solr.merge( id: "work", title_tesim: "Work", thumbnail_path_ss: "/test/image/path.jpg", label_tesim: ["work"] ) ) end let(:resource) { FactoryGirl.build(:file_set) } let(:parent) { FactoryGirl.build(:generic_work) } let(:parent_solr_doc) do SolrDocument.new(parent.to_solr.merge(id: "resource"), nil) end let(:parent_presenter) do CurationConcerns::WorkShowPresenter.new(parent_solr_doc, nil, view) end let(:blacklight_config) { CatalogController.new.blacklight_config } before do allow(parent_presenter).to receive(:member_presenters).and_return([file_set, member]) assign(:presenter, parent_presenter) # Blacklight nonsense allow(view).to receive(:dom_class) { '' } allow(view).to receive(:blacklight_config).and_return(blacklight_config) allow(view).to receive(:blacklight_configuration_context).and_return(CatalogController.new.send(:blacklight_configuration_context)) allow(view).to receive(:search_session).and_return({}) allow(view).to receive(:current_search_session).and_return(nil) allow(view).to receive(:curation_concern).and_return(parent) allow(view).to receive(:contextual_path).with(anything, anything) do |x, y| CurationConcerns::ContextualPath.new(x, y).show end render end it "has a bulk edit header" do expect(rendered).to include "