Sha256: ad68d6dc75d2a0297f130db5a118517267097196f5a84a1ca340876e89b82391
Contents?: true
Size: 716 Bytes
Versions: 4
Compression:
Stored size: 716 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: catalog_index_path end end end
Version data entries
4 entries across 4 versions & 1 rubygems