Sha256: 085d5547a86785cb1a280aa8a6d5f7d3ff36e139e531b183976993416227da70
Contents?: true
Size: 1.21 KB
Versions: 16
Compression:
Stored size: 1.21 KB
Contents
# encoding: utf-8 require_relative 'spec_helper' require 'libis/tools/config_file' require 'libis/services/rosetta/oai_pmh' describe 'Rosetta OAI-PMH Service' do let(:credentials) { Libis::Tools::ConfigFile.new File.join(File.dirname(__FILE__), 'credentials-test.yml'), debug: true } subject(:oai_handler) do # noinspection RubyResolve Libis::Services::Rosetta::OaiPmh.new credentials.rosetta_url end let(:expected_sets) { [ {name:'TESTINS-collections', spec: 'TESTINS-collections'} ] } let(:expected_collections) { [ 'Kerk & Leven', 'Kerk en leven. Bisdom Antwerpen (0991).', ] } let(:expected_records) { [ { id: 'oai:d4I1-pubam:IE405650', } ] } it 'should get set list' do sets = oai_handler.sets expect(sets[:entries]).to deep_include(expected_sets) end it 'should get list of collections' do status = {} collections = oai_handler.collections('TESTINS', status) expect(collections).to deep_include(expected_collections) end it 'should get list of records' do status = {} records = oai_handler.records('test_data', status) expect(records).to deep_include(expected_records) end end
Version data entries
16 entries across 16 versions & 1 rubygems