Sha256: 6532a9d862790480789ee40fa05fdd9bdfdad441cf8d106deee37052392dbfb7

Contents?: true

Size: 615 Bytes

Versions: 16

Compression:

Stored size: 615 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Blacklight::HeaderComponent, type: :component do
  before do
    with_controller_class(CatalogController) do
      allow(controller).to receive(:current_user).and_return(nil)
      allow(controller).to receive(:search_action_url).and_return('/search')
      render
    end
  end

  context 'with no slots' do
    let(:render) { render_inline(described_class.new(blacklight_config: CatalogController.blacklight_config)) }

    it 'draws the topbar' do
      expect(page).to have_css 'nav.topbar'
      expect(page).to have_link 'Blacklight', href: '/'
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
blacklight-7.40.0 spec/components/blacklight/header_component_spec.rb
blacklight-7.39.0 spec/components/blacklight/header_component_spec.rb
blacklight-7.38.0 spec/components/blacklight/header_component_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/components/blacklight/header_component_spec.rb
blacklight-8.2.2 spec/components/blacklight/header_component_spec.rb
blacklight-8.2.1 spec/components/blacklight/header_component_spec.rb
blacklight-8.2.0 spec/components/blacklight/header_component_spec.rb
blacklight-7.37.0 spec/components/blacklight/header_component_spec.rb
blacklight-7.36.2 spec/components/blacklight/header_component_spec.rb
blacklight-7.36.1 spec/components/blacklight/header_component_spec.rb
blacklight-7.36.0 spec/components/blacklight/header_component_spec.rb
blacklight-7.35.0 spec/components/blacklight/header_component_spec.rb
blacklight-8.1.0 spec/components/blacklight/header_component_spec.rb
blacklight-7.34.0 spec/components/blacklight/header_component_spec.rb
blacklight-8.0.1 spec/components/blacklight/header_component_spec.rb
blacklight-8.0.0 spec/components/blacklight/header_component_spec.rb