Sha256: 73cb0a1f2e8b708909fff25fbe80bd0f6441b9fb7e5edba3ee3bf12e97326817

Contents?: true

Size: 655 Bytes

Versions: 15

Compression:

Stored size: 655 Bytes

Contents

require 'spec_helper'

RSpec.describe 'catalog/_search_form.html.erb', type: :view do
  before do
    allow(view).to receive(:search_form_action).and_return("/catalog")
    allow(view).to receive(:search_state).and_return(search_state)
    allow(view).to receive(:current_search_parameters).and_return(nil)
    allow(view).to receive(:current_user).and_return(nil)

    render
  end
  let(:search_state) { double('SearchState', params_for_search: {}) }
  let(:page) { Capybara::Node::Simple.new(rendered) }

  it "has a hidden search_field input" do
    expect(page).to have_selector("[name='search_field'][value='all_fields']", visible: false)
  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
hyrax-1.1.1 spec/views/catalog/_search_form.html.erb_spec.rb
hyrax-1.1.0 spec/views/catalog/_search_form.html.erb_spec.rb
sufia-7.4.1 spec/views/catalog/_search_form.html.erb_spec.rb
hyrax-1.0.5 spec/views/catalog/_search_form.html.erb_spec.rb
sufia-7.4.0 spec/views/catalog/_search_form.html.erb_spec.rb
hyrax-1.0.4 spec/views/catalog/_search_form.html.erb_spec.rb
hyrax-1.0.3 spec/views/catalog/_search_form.html.erb_spec.rb
hyrax-1.0.2 spec/views/catalog/_search_form.html.erb_spec.rb
hyrax-1.0.1 spec/views/catalog/_search_form.html.erb_spec.rb
hyrax-1.0.0.rc2 spec/views/catalog/_search_form.html.erb_spec.rb
sufia-7.3.1 spec/views/catalog/_search_form.html.erb_spec.rb
hyrax-1.0.0.rc1 spec/views/catalog/_search_form.html.erb_spec.rb
sufia-7.3.0 spec/views/catalog/_search_form.html.erb_spec.rb
sufia-7.3.0.rc3 spec/views/catalog/_search_form.html.erb_spec.rb
sufia-7.3.0.rc2 spec/views/catalog/_search_form.html.erb_spec.rb