Sha256: cbf1fb537860f34b37c2b32cad3223850341392035ad051910e7974c180563f6
Contents?: true
Size: 841 Bytes
Versions: 1
Compression:
Stored size: 841 Bytes
Contents
require 'spec_helper' describe Blacklight::GalleryHelper do describe "#render_gallery_collection" do let(:template) { double } before do allow(template).to receive(:render).and_return("hello ") allow(helper).to receive(:gallery_wrapper_template).and_return(template) end let(:documents) { [ double, double] } subject { helper.render_gallery_collection documents} it { should eq 'hello hello ' } end describe "#gallery_wrapper_template" do before do helper.stub(:blacklight_config).and_return(CatalogController.blacklight_config) helper.lookup_context.prefixes << "catalog" end subject { helper.gallery_wrapper_template SolrDocument.new } it "should be the default template" do expect(subject.virtual_path).to eq 'catalog/_index_gallery' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blacklight-gallery-0.1.0 | spec/helpers/blacklight/gallery_helper_spec.rb |