Sha256: 936036435ac1f0dd1e8d6d51c8498e597f82377aaa45dc6944c9a07020490656
Contents?: true
Size: 1.53 KB
Versions: 9
Compression:
Stored size: 1.53 KB
Contents
require 'spec_helper' describe 'OIA-PMH ListMetadataFormats Request' do let(:xml) { Nokogiri::XML(response.body) } context 'without identifier parameter' do before do get '/catalog/oai?verb=ListMetadataFormats' end it 'contains oai_dc schema' do expect(xml.at_xpath('//xmlns:ListMetadataFormats/xmlns:metadataFormat/xmlns:schema').text).to eql 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd' end it 'contains oai_dc metadataPrefix' do expect(xml.at_xpath('//xmlns:ListMetadataFormats/xmlns:metadataFormat/xmlns:metadataPrefix').text).to eql 'oai_dc' end it 'contains oai_dc metadataNamespace' do expect(xml.at_xpath('//xmlns:ListMetadataFormats/xmlns:metadataFormat/xmlns:metadataNamespace').text).to eql 'http://www.openarchives.org/OAI/2.0/oai_dc/' end end context 'with identifier parameter' do before do get '/catalog/oai?verb=ListMetadataFormats&identifier=oai:test:2007020969' end it 'contains oai_dc schema' do expect(xml.at_xpath('//xmlns:ListMetadataFormats/xmlns:metadataFormat/xmlns:schema').text).to eql 'http://www.openarchives.org/OAI/2.0/oai_dc.xsd' end it 'contains oai_dc metadataPrefix' do expect(xml.at_xpath('//xmlns:ListMetadataFormats/xmlns:metadataFormat/xmlns:metadataPrefix').text).to eql 'oai_dc' end it 'contains oai_dc metadataNamespace' do expect(xml.at_xpath('//xmlns:ListMetadataFormats/xmlns:metadataFormat/xmlns:metadataNamespace').text).to eql 'http://www.openarchives.org/OAI/2.0/oai_dc/' end end end
Version data entries
9 entries across 9 versions & 1 rubygems