Sha256: e9afab7c5adce62b0511874535b1d57a0d4ffeefdd66dfa26774682ea70baa51

Contents?: true

Size: 538 Bytes

Versions: 45

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

45 entries across 45 versions & 2 rubygems

Version Path
blacklight-7.40.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.39.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.38.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/blacklight-7.37.0/spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.37.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.36.2 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.36.1 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.36.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.35.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.34.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.33.1 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.33.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.32.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.31.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.30.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.29.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.28.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.27.1 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.27.0 spec/lib/blacklight/configuration/view_config_spec.rb
blacklight-7.26.1 spec/lib/blacklight/configuration/view_config_spec.rb