Sha256: 26aca75b57bc3639a1818d8d5fe41f17472a188d330f7c5bc32e8ca17d799288

Contents?: true

Size: 823 Bytes

Versions: 14

Compression:

Stored size: 823 Bytes

Contents

# -*- encoding : utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')

# spec for sidebar partial in catalog show view

describe "/catalog/_show_sidebar.html.erb" do
  
  include BlacklightHelper
  include CatalogHelper


  before(:each) do

    view.stub(:blacklight_config).and_return(CatalogController.blacklight_config)
    view.stub(:has_user_authentication_provider?).and_return(false)
  end

  it "should show more-like-this titles in the sidebar" do
  	@document = SolrDocument.new :id => 1, :title_s => 'abc', :format => 'default'
  	@document.stub(:more_like_this).and_return([SolrDocument.new({ 'id' => 2, 'title_display' => 'Title of MLT Document' })])
    render
    rendered.should include_text("More Like This")
    rendered.should include_text("Title of MLT Document")
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
blacklight-4.4.2 spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.4.1 spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.4.0 spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.3.0 spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.2.2 spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.2.1 spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.2.0 spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.1.0 test_support/spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.0.1 test_support/spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.0.0 test_support/spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.0.0.rc2 test_support/spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.0.0.rc1 test_support/spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.0.0.pre7 test_support/spec/views/catalog/_show_sidebar.erb_spec.rb
blacklight-4.0.0.pre6 test_support/spec/views/catalog/_show_sidebar.erb_spec.rb