Sha256: 5b62fa640235666e74d2969f6fb235d4d2bff124e2c90a0baa54721f7939b8cd

Contents?: true

Size: 1.03 KB

Versions: 27

Compression:

Stored size: 1.03 KB

Contents

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

require 'libis/tools/config_file'
require 'libis/services/rosetta/sip_handler'

describe 'Rosetta SIP Service' do

  let(:credentials) { Libis::Tools::ConfigFile.new File.join(File.dirname(__FILE__), 'credentials-test.yml') }

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

  let(:expected_info) {
    { module: 'PER', stage: 'Finished', status: 'FINISHED' }
  }

  let(:expected_ies) { [{pid: 'IE403595'}] }

  it 'should get SIP info' do

    sip_info = sip_handler.get_info(55010)
    expect(sip_info).not_to be_nil
    expect(sip_info.to_hash).to match expected_info
  end

  it 'should get list of IEs in the SIP' do

    ies = sip_handler.get_ies(55010)
    expect(ies).not_to be_nil
    expect(ies.map(&:to_h)).to match_array expected_ies
  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
libis-services-0.1.7 spec/rosetta_sip_spec.rb
libis-services-0.1.5 spec/rosetta_sip_spec.rb
libis-services-0.1.3 spec/rosetta_sip_spec.rb
libis-services-0.1.2 spec/rosetta_sip_spec.rb
libis-services-0.1.1 spec/rosetta_sip_spec.rb
libis-services-0.1.0-java spec/rosetta_sip_spec.rb
libis-services-0.0.3 spec/rosetta_sip_spec.rb