Sha256: a3ea87f1cab5b5ca437ead0e246e0dd665d192b8ff83bbbdd4208fd23dcd086e

Contents?: true

Size: 830 Bytes

Versions: 1

Compression:

Stored size: 830 Bytes

Contents

# -*- encoding : utf-8 -*-
require '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)
    view.stub(:current_search_session).and_return nil
  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

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-5.0.0.pre1 spec/views/catalog/_show_sidebar.erb_spec.rb