Sha256: 0fd4ba8a0332ee1e10f8c9549385b73e480528d328210f62297927f04ed9f409

Contents?: true

Size: 447 Bytes

Versions: 12

Compression:

Stored size: 447 Bytes

Contents

require 'spec_helper'

describe Blacklight::Solr::FacetPaginator do
  let(:f1) { Blacklight::Solr::Response::Facets::FacetItem.new(hits: '792', value: 'Book') }
  describe "#as_json" do
    subject { described_class.new([f1], offset: 0, limit: nil).as_json }
    it "should be well structured" do
      expect(subject).to eq("items" => [{"hits"=>"792", "value"=>"Book"}], "limit" => nil,
       "offset" => 0, "sort" => "count")
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
blacklight-5.19.2 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.19.1 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.19.0 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.18.0 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.17.2 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.17.1 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.17.0 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.16.4 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.16.3 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.16.2 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.16.1 spec/models/blacklight/solr/facet_paginator_spec.rb
blacklight-5.16.0 spec/models/blacklight/solr/facet_paginator_spec.rb