Sha256: cb48bc1974b9a5886980ead8bb4a9dd603a7def40eef8392bbbe17105a7ed7e0
Contents?: true
Size: 759 Bytes
Versions: 27
Compression:
Stored size: 759 Bytes
Contents
require 'spec_helper' describe Spotlight::SearchConfigurationsHelper, type: :helper do describe '#translate_sort_fields' do let(:sort_config) do Blacklight::OpenStructWithHashAccess.new(sort: 'score asc, sort_title_ssi desc') end it 'translates sort fields' do expect(translate_sort_fields(sort_config)).to eq 'relevancy score ascending and title descending' end it 'humanizes untranslatable sort fields' do sort_config.sort = 'some_other_field desc' expect(translate_sort_fields(sort_config)).to eq 'some other field descending' end it 'supports explicit sort descriptions' do sort_config.sort_description = 'xyz' expect(translate_sort_fields(sort_config)).to eq 'xyz' end end end
Version data entries
27 entries across 27 versions & 1 rubygems