Sha256: 32de05b6af2880fb40c10221fb9a838c318f3d148ade05b157cf0d7372e2e071

Contents?: true

Size: 565 Bytes

Versions: 7

Compression:

Stored size: 565 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Blacklight::HeaderComponent, type: :component do
  before do
    with_controller_class(CatalogController) do
      allow(controller).to receive_messages(current_user: nil, search_action_url: '/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

7 entries across 7 versions & 2 rubygems

Version Path
blacklight-8.6.1 spec/components/blacklight/header_component_spec.rb
blacklight-8.6.0 spec/components/blacklight/header_component_spec.rb
blacklight-8.5.1 spec/components/blacklight/header_component_spec.rb
blacklight-8.5.0 spec/components/blacklight/header_component_spec.rb
blacklight-8.4.0 spec/components/blacklight/header_component_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/spec/components/blacklight/header_component_spec.rb
blacklight-8.3.0 spec/components/blacklight/header_component_spec.rb