Sha256: 8699421f83b436cccf0c50bce58d9b8d560452661f8d9876b465039436cfe861

Contents?: true

Size: 1.46 KB

Versions: 13

Compression:

Stored size: 1.46 KB

Contents

# encoding: utf-8
require_relative 'spec_helper'
require 'yaml'
require 'awesome_print'
require 'pp'

require 'libis/tools/config_file'
require 'libis/services/rosetta/pds_handler'
require 'libis/services/rosetta/ie_handler'

require_relative 'ie_data'
describe 'Rosetta IE Service' do

  let(:credentials) { Libis::Tools::ConfigFile.new File.join(File.dirname(__FILE__), 'credentials-test.yml') }
  let(:pds_handler) do
    # noinspection RubyResolve
    Libis::Services::Rosetta::PdsHandler.new(credentials.pds_url)
  end

  let(:handle) do
    # noinspection RubyResolve
    pds_handler.login(
        credentials.admin.user,
        credentials.admin.password,
        credentials.admin.institute
    )
  end

  subject(:ie_handler) do
    # noinspection RubyResolve
    Libis::Services::Rosetta::IeHandler.new credentials.rosetta_url,
                                            log: credentials.debug,
                                            log_level: credentials.debug_level
  end

  before :each do
    ie_handler.pds_handle = handle
  end

  it 'should get IE info' do

    mets = ie_handler.get_mets('IE403595')
    expect(mets).not_to be_nil
    ap mets
    expect(mets).to deep_include(expected_mets)
    # check_container expected_mets, mets
  end

  it 'should get IE metadata' do

    metadata = ie_handler.get_metadata('IE403595')
    expect(metadata).not_to be_nil
    expect(metadata).to deep_include(expected_ies)
    # check_container(expected_ies, metadata)
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
libis-services-1.0.5 spec/rosetta_ie_spec.rb
libis-services-1.0.2 spec/rosetta_ie_spec.rb
libis-services-1.0.1 spec/rosetta_ie_spec.rb
libis-services-1.0.0 spec/rosetta_ie_spec.rb
libis-services-0.2.1 spec/rosetta_ie_spec.rb
libis-services-0.2.0 spec/rosetta_ie_spec.rb
libis-services-0.1.18 spec/rosetta_ie_spec.rb
libis-services-0.1.17 spec/rosetta_ie_spec.rb
libis-services-0.1.16 spec/rosetta_ie_spec.rb
libis-services-0.1.15 spec/rosetta_ie_spec.rb
libis-services-0.1.14 spec/rosetta_ie_spec.rb
libis-services-0.1.13 spec/rosetta_ie_spec.rb
libis-services-0.1.12 spec/rosetta_ie_spec.rb