Sha256: a53d187820a8ce4b98b9f8fb1c91f846e10a0978529038ee4f6016ffc51ea4b3

Contents?: true

Size: 952 Bytes

Versions: 1

Compression:

Stored size: 952 Bytes

Contents

require 'spec_helper'

describe "Unapi", type: :feature do
  
  it "should have an abbr tag for the unapi id" do
    visit catalog_index_path(q: 'medicine')

    expect(page).to have_selector 'abbr.unapi-id'
  end

  it "should have an autodiscovery link" do
    visit catalog_index_path(q: 'medicine')
    expect(page).to have_selector 'link[rel="unapi-server"]', visible: false
  end
  
  it "should have unapi formats content" do
    visit unapi_path
    expect(page).to have_selector "format[name='oai_dc_xml']"
  end
  
  it "should have unapi document-specific formats content" do
    visit unapi_path id: 2008308201
    expect(page).to have_selector "format[name='oai_dc_xml']"
    expect(page).to have_selector "format[name='dc_xml']"
    expect(page).to have_selector "format[name='xml']"
  end
  
  it "should deliver the document format" do
    visit unapi_path id: 2008308201, format: 'xml'
    expect(page).to have_selector 'dc'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blacklight_unapi-0.1.0 spec/features/integration_spec.rb