Sha256: 69193b64fcc10835ca091ba4abf953a567379f713352a950eeb67f273003bced

Contents?: true

Size: 717 Bytes

Versions: 8

Compression:

Stored size: 717 Bytes

Contents

require 'spec_helper'

describe CurationConcernsHelper do
  describe 'render_constraints_query' do
    before do
      # Stub methods from Blacklight::SearchFields
      allow(helper).to receive(:default_search_field).and_return(CatalogController.blacklight_config.default_search_field)
      allow(helper).to receive(:label_for_search_field).and_return('Foo')
    end

    let(:search_params) { { q: 'Simon', search_field: 'publisher', controller: 'catalog' } }
    subject { helper.render_constraints_query(search_params) }

    it 'removes search_field' do
      node = Capybara::Node::Simple.new(subject)
      expect(node).to have_link 'Remove constraint Foo: Simon', href: search_catalog_path
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
curation_concerns-0.12.0.pre1 spec/helpers/render_constraints_helper_spec.rb
curation_concerns-0.11.0 spec/helpers/render_constraints_helper_spec.rb
curation_concerns-0.11.0.rc1 spec/helpers/render_constraints_helper_spec.rb
curation_concerns-0.10.0 spec/helpers/render_constraints_helper_spec.rb
curation_concerns-0.9.0 spec/helpers/render_constraints_helper_spec.rb
curation_concerns-0.8.0 spec/helpers/render_constraints_helper_spec.rb
curation_concerns-0.7.0 spec/helpers/render_constraints_helper_spec.rb
curation_concerns-0.6.0 spec/helpers/render_constraints_helper_spec.rb