Sha256: d183ba72f0705b10b87328e67e3768891ed3f44dd8e581423ac04cff294e60ef

Contents?: true

Size: 807 Bytes

Versions: 38

Compression:

Stored size: 807 Bytes

Contents

require 'spec_helper'

describe "catalog/openseadragon_default" do
  let(:document) { SolrDocument.new }
  let(:blacklight_config) { Blacklight::Configuration.new }
  let(:p) { "catalog/openseadragon_default.html.erb" }

  before do
    allow(view).to receive_messages(blacklight_config: blacklight_config, openseadragon_picture_tag: "<img />")
    allow(document).to receive_messages(to_openseadragon: [])
  end

  it "should render the openseadragon container" do
    render partial: p, locals: { document: document }
    expect(rendered).to have_selector ".openseadragon-container"
  end
  
  it "should support passing a container class" do
    render partial: p, locals: { document: document, osd_container_class: "custom-container" }
    expect(rendered).to have_selector ".custom-container"
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
blacklight-gallery-3.5.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.4.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.3.1 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.3.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.2.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.1.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.0.4 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.0.3 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.0.2 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.0.1 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-3.0.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-2.1.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-2.0.2 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-2.0.1 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-2.0.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-1.7.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-1.6.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-1.5.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-1.4.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb
blacklight-gallery-1.3.0 spec/views/catalog/_openseadragon_default.html.erb_spec.rb