Sha256: 66969e38546198ddba2b76e2c182180eb81dc692c22c693a5b7b76c13aaf7e2a

Contents?: true

Size: 566 Bytes

Versions: 74

Compression:

Stored size: 566 Bytes

Contents

# frozen_string_literal: true

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

  let(:key) { 'some_key' }
  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.fields.my_context.some_key", default: [:"blacklight.search.fields.some_key", label, subject.default_label]).and_return('x')
      expect(subject.display_label('my_context')).to eq 'x'
    end
  end
end

Version data entries

74 entries across 74 versions & 2 rubygems

Version Path
blacklight-7.18.0 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.17.2 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.17.1 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.17.0 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.16.0 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.15.2 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.15.1 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.15.0 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.14.1 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.14.0 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.13.2 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.13.1 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.13.0 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.12.1 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.12.0 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.11.1 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.10.0 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.9.0 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.8.1 spec/lib/blacklight/configuration/field_spec.rb
blacklight-7.8.0 spec/lib/blacklight/configuration/field_spec.rb