Sha256: 5b7b3824f47b84c27f62f8a4771967b194d5719e1e6acb4aec4a9b23cb875ad0

Contents?: true

Size: 538 Bytes

Versions: 23

Compression:

Stored size: 538 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Blacklight::Configuration::ViewConfig do
  subject { described_class.new(key: key, label: label) }

  let(:key) { 'my_view' }
  let(:label) { 'some label' }

  describe '#display_label' do
    it "looks up the label to display for the given document and field" do
      allow(I18n).to receive(:t).with(:'blacklight.search.view_title.my_view', default: [:'blacklight.search.view.my_view', label, nil, "My view"]).and_return('x')
      expect(subject.display_label).to eq 'x'
    end
  end
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
blacklight-8.8.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.7.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.6.1 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.6.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.5.1 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.5.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.4.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-8.3.0/spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.3.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.2.2 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.2.1 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.2.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.1.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.0.1 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.0.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.0.0.beta8 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.0.0.beta7 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.0.0.beta6 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.0.0.beta5 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-8.0.0.beta4 spec/lib/blacklight/configuration/view_config_spec.rb