Sha256: 31ede5955d4a5dfd88426a02d05b28b4e85b4e8de1179a3f0aeb3650ea9b658e
Contents?: true
Size: 1.06 KB
Versions: 26
Compression:
Stored size: 1.06 KB
Contents
# frozen_string_literal: true RSpec.describe Blacklight::Configuration::FacetField do describe '#normalize!' do context 'with existing properties' do let(:expected_presenter) { double } let(:expected_component) { double } before do subject.presenter = expected_presenter subject.component = expected_component end it 'preserves existing properties' do subject.normalize! expect(subject.presenter).to eq expected_presenter expect(subject.component).to eq expected_component end end it 'adds a default presenter and component' do subject.normalize! expect(subject.presenter).to eq Blacklight::FacetFieldPresenter expect(subject.component).to eq Blacklight::FacetFieldListComponent end context 'when component is set to true' do before do subject.component = true end it 'casts to the default component' do subject.normalize! expect(subject.component).to eq Blacklight::FacetFieldListComponent end end end end
Version data entries
26 entries across 26 versions & 2 rubygems