Sha256: a2e2cd96866126528d0606ff230c15a8d365a499d562fadcbe039823e0c0a9bf
Contents?: true
Size: 566 Bytes
Versions: 26
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
26 entries across 26 versions & 2 rubygems