Sha256: 8b769956e69ff7360676f3bb3e5bf610a0499a228b361f57edcc49bafc6dd78c

Contents?: true

Size: 756 Bytes

Versions: 5

Compression:

Stored size: 756 Bytes

Contents

# frozen_string_literal: true

describe "Search Formats" do
  before do
    # Get all the fields from Solr, so the #index documents have the MARC field (to trigger appropriate
    # export formats)
    CatalogController.blacklight_config.default_solr_params[:fl] = '*'
  end

  it "has an RSS XML response" do
    visit "/catalog.rss?q="
    expect(page).to have_content "Blacklight Search Results"
    doc = Nokogiri::XML(page.body)
    expect(doc.xpath("//item")).to have(10).items
  end

  it "has an ATOM XML response" do
    visit "/catalog.atom?q="
    expect(page).to have_content "Blacklight Search Results"
    doc = Nokogiri::XML(page.body)
    expect(doc.xpath("//atom:entry", atom: "http://www.w3.org/2005/Atom")).to have(10).entries
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
blacklight-6.5.0 spec/features/search_formats_spec.rb
blacklight-6.4.2 spec/features/search_formats_spec.rb
blacklight-6.4.1 spec/features/search_formats_spec.rb
blacklight-6.4.0 spec/features/search_formats_spec.rb
blacklight-6.3.3 spec/features/search_formats_spec.rb