Sha256: cac1a72e0f8ff9cd72586764dd1d6a1c4620eef1710ce4e7985d5bd479935be3

Contents?: true

Size: 800 Bytes

Versions: 11

Compression:

Stored size: 800 Bytes

Contents

require 'spec_helper'

describe "catalog/_document" do
  let :document do
    SolrDocument.new :id => 'xyz', :format => 'a'
  end

  let :blacklight_config do
    Blacklight::Configuration.new
  end

  it "should render the header, thumbnail and index" do
    view.stub(:blacklight_config).and_return(blacklight_config)
    stub_template "catalog/_document_header.html.erb" => "document_header"
    stub_template "catalog/_thumbnail_default.html.erb" => "thumbnail_default"
    stub_template "catalog/_index_default.html.erb" => "index_default"
    render :partial => "catalog/document", :locals => {:document => document, :document_counter => 1}
    expect(rendered).to match /document_header/
    expect(rendered).to match /thumbnail_default/
    expect(rendered).to match /index_default/
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
blacklight-4.7.0 spec/views/catalog/_document.html.erb_spec.rb
blacklight-4.7.0.pre1 spec/views/catalog/_document.html.erb_spec.rb
blacklight-4.6.3 spec/views/catalog/_document.html.erb_spec.rb
blacklight-4.6.2 spec/views/catalog/_document.html.erb_spec.rb
blacklight-4.6.1 spec/views/catalog/_document.html.erb_spec.rb
blacklight-5.0.0.pre1 spec/views/catalog/_document.html.erb_spec.rb
blacklight-4.6.0 spec/views/catalog/_document.html.erb_spec.rb
blacklight-4.5.0 spec/views/catalog/_document.html.erb_spec.rb
blacklight-4.5.0.rc1 spec/views/catalog/_document.html.erb_spec.rb
blacklight-4.4.2 spec/views/catalog/_document.html.erb_spec.rb
blacklight-4.4.1 spec/views/catalog/_document.html.erb_spec.rb