Sha256: 2bec68da1ddcc3ac521713d953b3e8641532c1444748e1bbc2bd31e80700509e

Contents?: true

Size: 1.02 KB

Versions: 5

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

describe CollectionsHelper do

  let(:blacklight_config) { CatalogController.blacklight_config }

  before(:each) do
    allow(helper).to receive_messages(blacklight_config: blacklight_config)
  end

  describe '#link_to_all_col_items' do
    before { @coll_items_link = helper.link_to_all_col_items('Foo Collection', 'Bar Institution', 'baz') }
    it 'should create a search link with the correct collection and institution params' do
      expect(@coll_items_link).to include("#{blacklight_config.collection_field}%5D%5B%5D=Foo+Collection")
      expect(@coll_items_link).to include("#{blacklight_config.institution_field}%5D=Bar+Institution")
    end
  end

  # TODO: figure out why this spec doesn't pass when run in CI/run-all-specs testing
  # getting NoMethodError: private method 'should_render_col_az?' called
  # works fine in context of this single spec though
  describe '#should_render_col_az?' do
    it 'should return false' #do
      #expect(helper.should_render_col_az?).to be_falsey
    #end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
commonwealth-vlr-engine-0.0.7 spec/helpers/collections_helper_spec.rb
commonwealth-vlr-engine-0.0.4 spec/helpers/collections_helper_spec.rb
commonwealth-vlr-engine-0.0.3 spec/helpers/collections_helper_spec.rb
commonwealth-vlr-engine-0.0.2 spec/helpers/collections_helper_spec.rb
commonwealth-vlr-engine-0.0.1 spec/helpers/collections_helper_spec.rb