Sha256: f4a95cdfc6f9b8a69dd6ce6d15de4fec19166e02ffb64fe07630188bdec56a15

Contents?: true

Size: 894 Bytes

Versions: 17

Compression:

Stored size: 894 Bytes

Contents

require 'spec_helper'

describe FacetsHelper do
  let(:blacklight_config) { Blacklight::Configuration.new }

  before(:each) do
    helper.stub(:blacklight_config).and_return blacklight_config
  end
  
  
  describe "render_selected_facet_value" do
    it "should be html_safe and not have the remove link" do
      item = double("item", :value=>'two', :hits=>9)
      ret_val = helper.render_selected_facet_value("one", item)
      ret_val.should == "<span class=\"selected\">two <span class=\"count\">9</span></span>"
      ret_val.should be_html_safe
    end
    it "should use facet_display_value" do
      item = double("item", :value=>'two', :hits=>9)
      helper.stub(:facet_display_value).and_return('four')
      ret_val = helper.render_selected_facet_value("one", item)
      ret_val.should == "<span class=\"selected\">four <span class=\"count\">9</span></span>"
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
hydra-core-6.5.2 spec/helpers/facets_helper_spec.rb
hydra-core-6.5.1 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.2 spec/helpers/facets_helper_spec.rb
hydra-core-6.5.0 spec/helpers/facets_helper_spec.rb
hydra-core-6.5.0.rc2 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.1 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.0 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.0.rc5 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.0.rc4 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.0.rc3 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.0.rc2 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.0.rc1 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.0.pre2 spec/helpers/facets_helper_spec.rb
hydra-core-6.4.0.pre1 spec/helpers/facets_helper_spec.rb
hydra-core-6.3.4 spec/helpers/facets_helper_spec.rb
hydra-core-6.3.3 spec/helpers/facets_helper_spec.rb
hydra-core-6.3.2 spec/helpers/facets_helper_spec.rb