Sha256: 2d46c3c5ee14b59c15f4d4b8fee59369eb0c237f1cfad2d51e79124b0769356b

Contents?: true

Size: 410 Bytes

Versions: 3

Compression:

Stored size: 410 Bytes

Contents

require 'spec_helper'

describe Spotlight::BlacklightConfigurationsHelper, type: :helper do
  describe "#translate_sort_fields" do
    let(:sort_config) {
      Blacklight::OpenStructWithHashAccess.new({sort: "score asc, sort_title_ssi desc"})
    }
    it 'should translate sort fields' do
      expect(translate_sort_fields(sort_config)).to eq 'relevancy score ascending, title descending'
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blacklight-spotlight-0.4.1 spec/helpers/spotlight/blacklight_configurations_helper_spec.rb
blacklight-spotlight-0.3.1 spec/helpers/spotlight/blacklight_configurations_helper_spec.rb
blacklight-spotlight-0.3.0 spec/helpers/spotlight/blacklight_configurations_helper_spec.rb